diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index bca1fb56c..7b5a5a406 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -47,30 +47,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz", - "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", - "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz", + "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==", "dev": true, "dependencies": { - "@ampproject/remapping": "^2.1.0", + "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helpers": "^7.20.7", - "@babel/parser": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.2", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.3", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.12", - "@babel/types": "^7.20.7", + "@babel/traverse": "^7.21.3", + "@babel/types": "^7.21.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -92,13 +92,14 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", - "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz", + "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==", "dev": true, "dependencies": { - "@babel/types": "^7.20.7", + "@babel/types": "^7.21.3", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -148,13 +149,13 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", + "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" }, "engines": { "node": ">=6.9.0" @@ -185,9 +186,9 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", - "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", + "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", @@ -196,8 +197,8 @@ "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.21.2", + "@babel/types": "^7.21.2" }, "engines": { "node": ">=6.9.0" @@ -255,23 +256,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.13.tgz", - "integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", + "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", "dev": true, "dependencies": { "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" }, "engines": { "node": ">=6.9.0" @@ -363,9 +364,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", - "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", + "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -566,19 +567,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", - "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz", + "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", + "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", + "@babel/parser": "^7.21.3", + "@babel/types": "^7.21.3", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -596,9 +597,9 @@ } }, "node_modules/@babel/types": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz", - "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz", + "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.19.4", @@ -615,15 +616,39 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", + "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -638,6 +663,15 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/js": { + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -780,16 +814,16 @@ } }, "node_modules/@jest/console": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.4.1.tgz", - "integrity": "sha512-m+XpwKSi3PPM9znm5NGS8bBReeAJJpSkL1OuFCqaMaJL2YX9YXLkkI+MBchMPwu+ZuM2rynL51sgfkQteQ1CKQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.5.0.tgz", + "integrity": "sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0" }, "engines": { @@ -797,37 +831,37 @@ } }, "node_modules/@jest/core": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.4.1.tgz", - "integrity": "sha512-RXFTohpBqpaTebNdg5l3I5yadnKo9zLBajMT0I38D0tDhreVBYv3fA8kywthI00sWxPztWLD3yjiUkewwu/wKA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", + "integrity": "sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==", "dev": true, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/reporters": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/reporters": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.4.0", - "jest-config": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-resolve-dependencies": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", - "jest-watcher": "^29.4.1", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-resolve-dependencies": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "jest-watcher": "^29.5.0", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -844,88 +878,88 @@ } }, "node_modules/@jest/environment": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.4.1.tgz", - "integrity": "sha512-pJ14dHGSQke7Q3mkL/UZR9ZtTOxqskZaC91NzamEH4dlKRt42W+maRBXiw/LWkdJe+P0f/zDR37+SPMplMRlPg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", + "integrity": "sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1" + "jest-mock": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.4.1.tgz", - "integrity": "sha512-ZxKJP5DTUNF2XkpJeZIzvnzF1KkfrhEF6Rz0HGG69fHl6Bgx5/GoU3XyaeFYEjuuKSOOsbqD/k72wFvFxc3iTw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==", "dev": true, "dependencies": { - "expect": "^29.4.1", - "jest-snapshot": "^29.4.1" + "expect": "^29.5.0", + "jest-snapshot": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.4.1.tgz", - "integrity": "sha512-w6YJMn5DlzmxjO00i9wu2YSozUYRBhIoJ6nQwpMYcBMtiqMGJm1QBzOf6DDgRao8dbtpDoaqLg6iiQTvv0UHhQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.5.0.tgz", + "integrity": "sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==", "dev": true, "dependencies": { - "jest-get-type": "^29.2.0" + "jest-get-type": "^29.4.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.4.1.tgz", - "integrity": "sha512-/1joI6rfHFmmm39JxNfmNAO3Nwm6Y0VoL5fJDy7H1AtWrD1CgRtqJbN9Ld6rhAkGO76qqp4cwhhxJ9o9kYjQMw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.5.0.tgz", + "integrity": "sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.4.1.tgz", - "integrity": "sha512-znoK2EuFytbHH0ZSf2mQK2K1xtIgmaw4Da21R2C/NE/+NnItm5mPEFQmn8gmF3f0rfOlmZ3Y3bIf7bFj7DHxAA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.5.0.tgz", + "integrity": "sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/types": "^29.4.1", - "jest-mock": "^29.4.1" + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/types": "^29.5.0", + "jest-mock": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.4.1.tgz", - "integrity": "sha512-AISY5xpt2Xpxj9R6y0RF1+O6GRy9JsGa8+vK23Lmzdy1AYcpQn5ItX79wJSsTmfzPKSAcsY1LNt/8Y5Xe5LOSg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.5.0.tgz", + "integrity": "sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -938,9 +972,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -959,9 +993,9 @@ } }, "node_modules/@jest/schemas": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.0.tgz", - "integrity": "sha512-0E01f/gOZeNTG76i5eWWSupvSHaIINrTie7vCyjiYFKgzNdyEGd12BUv4oNBFHOqlHDbtoJi3HrQ38KCC90NsQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", "dev": true, "dependencies": { "@sinclair/typebox": "^0.25.16" @@ -971,9 +1005,9 @@ } }, "node_modules/@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", + "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.15", @@ -985,13 +1019,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.4.1.tgz", - "integrity": "sha512-WRt29Lwt+hEgfN8QDrXqXGgCTidq1rLyFqmZ4lmJOpVArC8daXrZWkWjiaijQvgd3aOUj2fM8INclKHsQW9YyQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.5.0.tgz", + "integrity": "sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==", "dev": true, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/types": "^29.5.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -1000,14 +1034,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.4.1.tgz", - "integrity": "sha512-v5qLBNSsM0eHzWLXsQ5fiB65xi49A3ILPSFQKPXzGL4Vyux0DPZAIN7NAFJa9b4BiTDP9MBF/Zqc/QA1vuiJ0w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz", + "integrity": "sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==", "dev": true, "dependencies": { - "@jest/test-result": "^29.4.1", + "@jest/test-result": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "slash": "^3.0.0" }, "engines": { @@ -1015,38 +1049,38 @@ } }, "node_modules/@jest/transform": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.4.1.tgz", - "integrity": "sha512-5w6YJrVAtiAgr0phzKjYd83UPbCXsBRTeYI4BXokv9Er9CcrH9hfXL/crCvP2d2nGOcovPUnlYiLPFLZrkG5Hg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.5.0.tgz", + "integrity": "sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", + "jest-haste-map": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^5.0.0" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.4.1.tgz", - "integrity": "sha512-zbrAXDUOnpJ+FMST2rV7QZOgec8rskg2zv8g2ajeqitp4tvZiyqTCYXANrKsM+ryj5o+LI+ZN2EgU9drrkiwSA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", + "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", "dev": true, "dependencies": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -1140,9 +1174,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.25.21", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.21.tgz", - "integrity": "sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==", + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", "dev": true }, "node_modules/@sinonjs/commons": { @@ -1238,9 +1272,9 @@ } }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", + "version": "18.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", + "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==", "dev": true }, "node_modules/@types/prettier": { @@ -1256,9 +1290,9 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.20", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.20.tgz", - "integrity": "sha512-eknWrTHofQuPk2iuqDm1waA7V6xPlbgBoaaXEgYkClhLOnB0TtbW+srJaOToAgawPxPlHQzwypFA2bhZaUGP5A==", + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -1383,9 +1417,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.5.tgz", - "integrity": "sha512-9pU/8mmjSSOb4CXVsvGIevN+MlO/t9OWtKadTaLuN85Gge3HGorUckgp8A/2FH4V4hJ7JuQ3LIeI7KAV9ITZrQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -1393,15 +1427,15 @@ } }, "node_modules/babel-jest": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.4.1.tgz", - "integrity": "sha512-xBZa/pLSsF/1sNpkgsiT3CmY7zV1kAsZ9OxxtrFqYucnOuRftXAfcJqcDVyOPeN4lttWTwhLdu0T9f8uvoPEUg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", + "integrity": "sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==", "dev": true, "dependencies": { - "@jest/transform": "^29.4.1", + "@jest/transform": "^29.5.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.4.0", + "babel-preset-jest": "^29.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -1430,9 +1464,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.0.tgz", - "integrity": "sha512-a/sZRLQJEmsmejQ2rPEUe35nO1+C9dc9O1gplH1SXmJxveQSRUYdBk8yGZG/VOUuZs1u2aHZJusEGoRMbhhwCg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -1468,12 +1502,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.4.0.tgz", - "integrity": "sha512-fUB9vZflUSM3dO/6M2TCAepTzvA4VkOvl67PjErcrQMGt9Eve7uazaeyCZ2th3UtI7ljpiBJES0F7A1vBRsLZA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.4.0", + "babel-plugin-jest-hoist": "^29.5.0", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -1512,9 +1546,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", "dev": true, "funding": [ { @@ -1527,10 +1561,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" }, "bin": { "browserslist": "cli.js" @@ -1573,9 +1607,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001449", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001449.tgz", - "integrity": "sha512-CPB+UL9XMT/Av+pJxCKGhdx+yg1hzplvFJQlJ2n68PyQGMz9L/E2zCyLdOL8uasbouTUgnPl+y0tccI/se+BEw==", + "version": "1.0.30001467", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001467.tgz", + "integrity": "sha512-cEdN/5e+RPikvl9AHm4uuLXxeCNq8rFsQ+lPHTfe/OtypP3WwnVVbjn+6uBV7PaFL6xUFzTh+sSCOz1rKhcO+Q==", "dev": true, "funding": [ { @@ -1614,9 +1648,9 @@ } }, "node_modules/ci-info": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", - "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, "funding": [ { @@ -1749,9 +1783,9 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1775,9 +1809,9 @@ } }, "node_modules/diff-sequences": { - "version": "29.3.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", - "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -1796,9 +1830,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.333", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.333.tgz", + "integrity": "sha512-YyE8+GKyGtPEP1/kpvqsdhD6rA/TP1DUFDN4uiU/YI52NzDxmwHkEb3qjId8hLBa5siJvG0sfC3O66501jMruQ==", "dev": true }, "node_modules/emittery": { @@ -1850,12 +1884,15 @@ } }, "node_modules/eslint": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", - "integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.4.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1866,10 +1903,9 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -1890,7 +1926,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -1918,33 +1953,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -1955,9 +1963,9 @@ } }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -1985,9 +1993,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2059,16 +2067,16 @@ } }, "node_modules/expect": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.4.1.tgz", - "integrity": "sha512-OKrGESHOaMxK3b6zxIq9SOW8kEXztKff/Dvg88j4xIJxur1hspEbedVkR3GpHe5LO+WB2Qw7OWN0RMTdp6as5A==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1" + "@jest/expect-utils": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2304,9 +2312,9 @@ } }, "node_modules/globals": { - "version": "13.19.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", - "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2319,9 +2327,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/grapheme-splitter": { @@ -2595,15 +2603,15 @@ } }, "node_modules/jest": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.1.tgz", - "integrity": "sha512-cknimw7gAXPDOmj0QqztlxVtBVCw2lYY9CeIE5N6kD+kET1H4H79HSNISJmijb1HF+qk+G+ploJgiDi5k/fRlg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", + "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", "dev": true, "dependencies": { - "@jest/core": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/types": "^29.5.0", "import-local": "^3.0.2", - "jest-cli": "^29.4.1" + "jest-cli": "^29.5.0" }, "bin": { "jest": "bin/jest.js" @@ -2621,9 +2629,9 @@ } }, "node_modules/jest-changed-files": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.4.0.tgz", - "integrity": "sha512-rnI1oPxgFghoz32Y8eZsGJMjW54UlqT17ycQeCEktcxxwqqKdlj9afl8LNeO0Pbu+h2JQHThQP0BzS67eTRx4w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", "dev": true, "dependencies": { "execa": "^5.0.0", @@ -2634,28 +2642,29 @@ } }, "node_modules/jest-circus": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.4.1.tgz", - "integrity": "sha512-v02NuL5crMNY4CGPHBEflLzl4v91NFb85a+dH9a1pUNx6Xjggrd8l9pPy4LZ1VYNRXlb+f65+7O/MSIbLir6pA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.5.0.tgz", + "integrity": "sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==", "dev": true, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", + "jest-each": "^29.5.0", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "p-limit": "^3.1.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2664,21 +2673,21 @@ } }, "node_modules/jest-cli": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.4.1.tgz", - "integrity": "sha512-jz7GDIhtxQ37M+9dlbv5K+/FVcIo1O/b1sX3cJgzlQUf/3VG25nvuWzlDC4F1FLLzUThJeWLu8I7JF9eWpuURQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", + "integrity": "sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==", "dev": true, "dependencies": { - "@jest/core": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-config": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -2698,31 +2707,31 @@ } }, "node_modules/jest-config": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.4.1.tgz", - "integrity": "sha512-g7p3q4NuXiM4hrS4XFATTkd+2z0Ml2RhFmFPM8c3WyKwVDNszbl4E7cV7WIx1YZeqqCtqbtTtZhGZWJlJqngzg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", + "integrity": "sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.4.1", - "@jest/types": "^29.4.1", - "babel-jest": "^29.4.1", + "@jest/test-sequencer": "^29.5.0", + "@jest/types": "^29.5.0", + "babel-jest": "^29.5.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.4.1", - "jest-environment-node": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-circus": "^29.5.0", + "jest-environment-node": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -2743,24 +2752,24 @@ } }, "node_modules/jest-diff": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.4.1.tgz", - "integrity": "sha512-uazdl2g331iY56CEyfbNA0Ut7Mn2ulAG5vUaEHXycf1L6IPyuImIxSz4F0VYBKi7LYIuxOwTZzK3wh5jHzASMw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", + "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.3.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -2770,62 +2779,62 @@ } }, "node_modules/jest-each": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.4.1.tgz", - "integrity": "sha512-QlYFiX3llJMWUV0BtWht/esGEz9w+0i7BHwODKCze7YzZzizgExB9MOfiivF/vVT0GSQ8wXLhvHXh3x2fVD4QQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.5.0.tgz", + "integrity": "sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.4.1", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "jest-util": "^29.5.0", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.4.1.tgz", - "integrity": "sha512-x/H2kdVgxSkxWAIlIh9MfMuBa0hZySmfsC5lCsWmWr6tZySP44ediRKDUiNggX/eHLH7Cd5ZN10Rw+XF5tXsqg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.5.0.tgz", + "integrity": "sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==", "dev": true, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.4.1.tgz", - "integrity": "sha512-imTjcgfVVTvg02khXL11NNLTx9ZaofbAWhilrMg/G8dIkp+HYCswhxf0xxJwBkfhWb3e8dwbjuWburvxmcr58w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.5.0.tgz", + "integrity": "sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -2837,46 +2846,46 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.4.1.tgz", - "integrity": "sha512-akpZv7TPyGMnH2RimOCgy+hPmWZf55EyFUvymQ4LMsQP8xSPlZumCPtXGoDhFNhUE2039RApZkTQDKU79p/FiQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", + "integrity": "sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==", "dev": true, "dependencies": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.4.1.tgz", - "integrity": "sha512-k5h0u8V4nAEy6lSACepxL/rw78FLDkBnXhZVgFneVpnJONhb2DhZj/Gv4eNe+1XqQ5IhgUcqj745UwH0HJmMnA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz", + "integrity": "sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.4.1.tgz", - "integrity": "sha512-H4/I0cXUaLeCw6FM+i4AwCnOwHRgitdaUFOdm49022YD5nfyr8C/DrbXOBEyJaj+w/y0gGJ57klssOaUiLLQGQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", + "integrity": "sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2885,14 +2894,14 @@ } }, "node_modules/jest-mock": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.4.1.tgz", - "integrity": "sha512-MwA4hQ7zBOcgVCVnsM8TzaFLVUD/pFWTfbkY953Y81L5ret3GFRZtmPmRFAjKQSdCKoJvvqOu6Bvfpqlwwb0dQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", + "integrity": "sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-util": "^29.4.1" + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2916,26 +2925,26 @@ } }, "node_modules/jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.4.1.tgz", - "integrity": "sha512-j/ZFNV2lm9IJ2wmlq1uYK0Y/1PiyDq9g4HEGsNTNr3viRbJdV+8Lf1SXIiLZXFvyiisu0qUyIXGBnw+OKWkJwQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.5.0.tgz", + "integrity": "sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" @@ -2945,43 +2954,43 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.1.tgz", - "integrity": "sha512-Y3QG3M1ncAMxfjbYgtqNXC5B595zmB6e//p/qpA/58JkQXu/IpLDoLeOa8YoYfsSglBKQQzNUqtfGJJT/qLmJg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz", + "integrity": "sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==", "dev": true, "dependencies": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.4.1" + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.4.1.tgz", - "integrity": "sha512-8d6XXXi7GtHmsHrnaqBKWxjKb166Eyj/ksSaUYdcBK09VbjPwIgWov1VwSmtupCIz8q1Xv4Qkzt/BTo3ZqiCeg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", + "integrity": "sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==", "dev": true, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/environment": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/environment": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-leak-detector": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-resolve": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-util": "^29.4.1", - "jest-watcher": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-leak-detector": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-resolve": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-util": "^29.5.0", + "jest-watcher": "^29.5.0", + "jest-worker": "^29.5.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -2990,32 +2999,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.4.1.tgz", - "integrity": "sha512-UXTMU9uKu2GjYwTtoAw5rn4STxWw/nadOfW7v1sx6LaJYa3V/iymdCLQM6xy3+7C6mY8GfX22vKpgxY171UIoA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/globals": "^29.4.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", + "integrity": "sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/globals": "^29.5.0", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "semver": "^7.3.5", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -3023,43 +3031,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-runtime/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-runtime/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/jest-snapshot": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.4.1.tgz", - "integrity": "sha512-l4iV8EjGgQWVz3ee/LR9sULDk2pCkqb71bjvlqn+qp90lFwpnulHj4ZBT8nm1hA1C5wowXLc7MGnw321u0tsYA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", + "integrity": "sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", @@ -3068,23 +3043,22 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/expect-utils": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.4.1", + "expect": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "semver": "^7.3.5" }, "engines": { @@ -3125,12 +3099,12 @@ "dev": true }, "node_modules/jest-util": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.4.1.tgz", - "integrity": "sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", + "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -3142,17 +3116,17 @@ } }, "node_modules/jest-validate": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.4.1.tgz", - "integrity": "sha512-qNZXcZQdIQx4SfUB/atWnI4/I2HUvhz8ajOSYUu40CSmf9U5emil8EDHgE7M+3j9/pavtk3knlZBDsgFvv/SWw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", + "integrity": "sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", + "jest-get-type": "^29.4.3", "leven": "^3.1.0", - "pretty-format": "^29.4.1" + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3171,18 +3145,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.4.1.tgz", - "integrity": "sha512-vFOzflGFs27nU6h8dpnVRER3O2rFtL+VMEwnG0H3KLHcllLsU8y9DchSh0AL/Rg5nN1/wSiQ+P4ByMGpuybaVw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", + "integrity": "sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==", "dev": true, "dependencies": { - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "string-length": "^4.0.1" }, "engines": { @@ -3190,13 +3164,13 @@ } }, "node_modules/jest-worker": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.1.tgz", - "integrity": "sha512-O9doU/S1EBe+yp/mstQ0VpPwpv0Clgn68TkNwGxL6/usX/KUW9Arnn4ag8C3jc6qHcXznhsT5Na1liYzAsuAbQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", + "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", "dev": true, "dependencies": { "@types/node": "*", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -3454,9 +3428,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, "node_modules/normalize-path": { @@ -3733,12 +3707,12 @@ } }, "node_modules/pretty-format": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.1.tgz", - "integrity": "sha512-dt/Z761JUVsrIKaY215o1xQJBGlSmTx/h4cSqXqjHLnU1+Kt+mavVE7UgqJJO5ukx5HjSswHfmXz4LjS2oIJfg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", + "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3793,6 +3767,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.1.tgz", + "integrity": "sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3819,18 +3809,6 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3888,9 +3866,9 @@ } }, "node_modules/resolve.exports": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", - "integrity": "sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.1.tgz", + "integrity": "sha512-OEJWVeimw8mgQuj3HfkNl4KqRevH7lzeQNaWRPfx0PPse7Jk6ozcsG4FKVgtzDsC1KUF+YlTHh17NcgHOPykLw==", "dev": true, "engines": { "node": ">=10" @@ -4279,9 +4257,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -4355,16 +4333,16 @@ "dev": true }, "node_modules/write-file-atomic": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz", - "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/y18n": { @@ -4383,9 +4361,9 @@ "dev": true }, "node_modules/yargs": { - "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", "dev": true, "dependencies": { "cliui": "^8.0.1", diff --git a/node_modules/@babel/compat-data/package.json b/node_modules/@babel/compat-data/package.json index 418f19510..60dae3a71 100644 --- a/node_modules/@babel/compat-data/package.json +++ b/node_modules/@babel/compat-data/package.json @@ -1,6 +1,6 @@ { "name": "@babel/compat-data", - "version": "7.20.10", + "version": "7.21.0", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", "description": "", diff --git a/node_modules/@babel/core/cjs-proxy.cjs b/node_modules/@babel/core/cjs-proxy.cjs index 4bf8b5cb9..a53f616df 100644 --- a/node_modules/@babel/core/cjs-proxy.cjs +++ b/node_modules/@babel/core/cjs-proxy.cjs @@ -1,6 +1,12 @@ "use strict"; const babelP = import("./lib/index.js"); +let babel = null; +Object.defineProperty(exports, "__ initialize @babel/core cjs proxy __", { + set(val) { + babel = val; + }, +}); const functionNames = [ "createConfigItem", @@ -11,13 +17,9 @@ const functionNames = [ "transformFromAst", "parse", ]; +const propertyNames = ["types", "tokTypes", "traverse", "template", "version"]; for (const name of functionNames) { - exports[`${name}Sync`] = function () { - throw new Error( - `"${name}Sync" is not supported when loading @babel/core using require()` - ); - }; exports[name] = function (...args) { babelP.then(babel => { babel[name](...args); @@ -26,4 +28,24 @@ for (const name of functionNames) { exports[`${name}Async`] = function (...args) { return babelP.then(babel => babel[`${name}Async`](...args)); }; + exports[`${name}Sync`] = function (...args) { + if (!babel) throw notLoadedError(`${name}Sync`, "callable"); + return babel[`${name}Sync`](...args); + }; +} + +for (const name of propertyNames) { + Object.defineProperty(exports, name, { + get() { + if (!babel) throw notLoadedError(name, "accessible"); + return babel[name]; + }, + }); +} + +function notLoadedError(name, keyword) { + return new Error( + `The \`${name}\` export of @babel/core is only ${keyword}` + + ` from the CommonJS version after that the ESM version is loaded.` + ); } diff --git a/node_modules/@babel/core/lib/config/caching.js.map b/node_modules/@babel/core/lib/config/caching.js.map index 385a0526f..1b78fba07 100644 --- a/node_modules/@babel/core/lib/config/caching.js.map +++ b/node_modules/@babel/core/lib/config/caching.js.map @@ -1 +1 @@ -{"version":3,"names":["synchronize","gen","gensync","sync","genTrue","makeWeakCache","handler","makeCachedFunction","WeakMap","makeWeakCacheSync","makeStrongCache","Map","makeStrongCacheSync","CallCache","callCacheSync","callCacheAsync","futureCache","cachedFunction","arg","data","asyncContext","isAsync","callCache","cached","getCachedValueOrWait","valid","value","cache","CacheConfigurator","handlerResult","finishLock","isIterableIterator","onFirstPause","setupAsyncLocks","updateFunctionCache","delete","release","getCachedValue","cachedValue","get","waitFor","promise","config","Lock","configured","forever","deactivate","mode","set","validator","push","constructor","_active","_never","_forever","_invalidate","_configured","_pairs","_data","simple","makeSimpleConfigurator","Error","never","using","key","fn","maybeAsync","isThenable","then","invalidate","pairs","cacheFn","val","assertSimpleType","cb","released","_resolve","Promise","resolve"],"sources":["../../src/config/caching.ts"],"sourcesContent":["import gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport {\n maybeAsync,\n isAsync,\n onFirstPause,\n waitFor,\n isThenable,\n} from \"../gensync-utils/async\";\nimport { isIterableIterator } from \"./util\";\n\nexport type { CacheConfigurator };\n\nexport type SimpleCacheConfigurator = {\n (forever: boolean): void;\n (handler: () => T): T;\n\n forever: () => void;\n never: () => void;\n using: (handler: () => T) => T;\n invalidate: (handler: () => T) => T;\n};\n\nexport type CacheEntry = Array<{\n value: ResultT;\n valid: (channel: SideChannel) => Handler;\n}>;\n\nconst synchronize = (\n gen: (...args: ArgsT) => Handler,\n): ((...args: ArgsT) => ResultT) => {\n return gensync(gen).sync;\n};\n\n// eslint-disable-next-line require-yield\nfunction* genTrue() {\n return true;\n}\n\nexport function makeWeakCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(WeakMap, handler);\n}\n\nexport function makeWeakCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeWeakCache(handler),\n );\n}\n\nexport function makeStrongCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(Map, handler);\n}\n\nexport function makeStrongCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeStrongCache(handler),\n );\n}\n\n/* NOTE: Part of the logic explained in this comment is explained in the\n * getCachedValueOrWait and setupAsyncLocks functions.\n *\n * > There are only two hard things in Computer Science: cache invalidation and naming things.\n * > -- Phil Karlton\n *\n * I don't know if Phil was also thinking about handling a cache whose invalidation function is\n * defined asynchronously is considered, but it is REALLY hard to do correctly.\n *\n * The implemented logic (only when gensync is run asynchronously) is the following:\n * 1. If there is a valid cache associated to the current \"arg\" parameter,\n * a. RETURN the cached value\n * 3. If there is a FinishLock associated to the current \"arg\" parameter representing a valid cache,\n * a. Wait for that lock to be released\n * b. RETURN the value associated with that lock\n * 5. Start executing the function to be cached\n * a. If it pauses on a promise, then\n * i. Let FinishLock be a new lock\n * ii. Store FinishLock as associated to the current \"arg\" parameter\n * iii. Wait for the function to finish executing\n * iv. Release FinishLock\n * v. Send the function result to anyone waiting on FinishLock\n * 6. Store the result in the cache\n * 7. RETURN the result\n */\nfunction makeCachedFunction(\n CallCache: new () => CacheMap,\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n const callCacheSync = new CallCache();\n const callCacheAsync = new CallCache();\n const futureCache = new CallCache>();\n\n return function* cachedFunction(arg: ArgT, data: SideChannel) {\n const asyncContext = yield* isAsync();\n const callCache = asyncContext ? callCacheAsync : callCacheSync;\n\n const cached = yield* getCachedValueOrWait(\n asyncContext,\n callCache,\n futureCache,\n arg,\n data,\n );\n if (cached.valid) return cached.value;\n\n const cache = new CacheConfigurator(data);\n\n const handlerResult: Handler | ResultT = handler(arg, cache);\n\n let finishLock: Lock;\n let value: ResultT;\n\n if (isIterableIterator(handlerResult)) {\n value = yield* onFirstPause(handlerResult, () => {\n finishLock = setupAsyncLocks(cache, futureCache, arg);\n });\n } else {\n value = handlerResult;\n }\n\n updateFunctionCache(callCache, cache, arg, value);\n\n if (finishLock) {\n futureCache.delete(arg);\n finishLock.release(value);\n }\n\n return value;\n };\n}\n\ntype CacheMap =\n | Map>\n // @ts-expect-error todo(flow->ts): add `extends object` constraint to ArgT\n | WeakMap>;\n\nfunction* getCachedValue(\n cache: CacheMap,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cachedValue: CacheEntry | void = cache.get(arg);\n\n if (cachedValue) {\n for (const { value, valid } of cachedValue) {\n if (yield* valid(data)) return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction* getCachedValueOrWait(\n asyncContext: boolean,\n callCache: CacheMap,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cached = yield* getCachedValue(callCache, arg, data);\n if (cached.valid) {\n return cached;\n }\n\n if (asyncContext) {\n const cached = yield* getCachedValue(futureCache, arg, data);\n if (cached.valid) {\n const value = yield* waitFor(cached.value.promise);\n return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction setupAsyncLocks(\n config: CacheConfigurator,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n): Lock {\n const finishLock = new Lock();\n\n updateFunctionCache(futureCache, config, arg, finishLock);\n\n return finishLock;\n}\n\nfunction updateFunctionCache<\n ArgT,\n ResultT,\n SideChannel,\n Cache extends CacheMap,\n>(\n cache: Cache,\n config: CacheConfigurator,\n arg: ArgT,\n value: ResultT,\n) {\n if (!config.configured()) config.forever();\n\n let cachedValue: CacheEntry | void = cache.get(arg);\n\n config.deactivate();\n\n switch (config.mode()) {\n case \"forever\":\n cachedValue = [{ value, valid: genTrue }];\n cache.set(arg, cachedValue);\n break;\n case \"invalidate\":\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n break;\n case \"valid\":\n if (cachedValue) {\n cachedValue.push({ value, valid: config.validator() });\n } else {\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n }\n }\n}\n\nclass CacheConfigurator {\n _active: boolean = true;\n _never: boolean = false;\n _forever: boolean = false;\n _invalidate: boolean = false;\n\n _configured: boolean = false;\n\n _pairs: Array<\n [cachedValue: unknown, handler: (data: SideChannel) => Handler]\n > = [];\n\n _data: SideChannel;\n\n constructor(data: SideChannel) {\n this._data = data;\n }\n\n simple() {\n return makeSimpleConfigurator(this);\n }\n\n mode() {\n if (this._never) return \"never\";\n if (this._forever) return \"forever\";\n if (this._invalidate) return \"invalidate\";\n return \"valid\";\n }\n\n forever() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never) {\n throw new Error(\"Caching has already been configured with .never()\");\n }\n this._forever = true;\n this._configured = true;\n }\n\n never() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._forever) {\n throw new Error(\"Caching has already been configured with .forever()\");\n }\n this._never = true;\n this._configured = true;\n }\n\n using(handler: (data: SideChannel) => T): T {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never || this._forever) {\n throw new Error(\n \"Caching has already been configured with .never or .forever()\",\n );\n }\n this._configured = true;\n\n const key = handler(this._data);\n\n const fn = maybeAsync(\n handler,\n `You appear to be using an async cache handler, but Babel has been called synchronously`,\n );\n\n if (isThenable(key)) {\n // @ts-expect-error todo(flow->ts): improve function return type annotation\n return key.then((key: unknown) => {\n this._pairs.push([key, fn]);\n return key;\n });\n }\n\n this._pairs.push([key, fn]);\n return key;\n }\n\n invalidate(handler: (data: SideChannel) => T): T {\n this._invalidate = true;\n return this.using(handler);\n }\n\n validator(): (data: SideChannel) => Handler {\n const pairs = this._pairs;\n return function* (data: SideChannel) {\n for (const [key, fn] of pairs) {\n if (key !== (yield* fn(data))) return false;\n }\n return true;\n };\n }\n\n deactivate() {\n this._active = false;\n }\n\n configured() {\n return this._configured;\n }\n}\n\nfunction makeSimpleConfigurator(\n cache: CacheConfigurator,\n): SimpleCacheConfigurator {\n function cacheFn(val: any) {\n if (typeof val === \"boolean\") {\n if (val) cache.forever();\n else cache.never();\n return;\n }\n\n return cache.using(() => assertSimpleType(val()));\n }\n cacheFn.forever = () => cache.forever();\n cacheFn.never = () => cache.never();\n cacheFn.using = (cb: { (): SimpleType }) =>\n cache.using(() => assertSimpleType(cb()));\n cacheFn.invalidate = (cb: { (): SimpleType }) =>\n cache.invalidate(() => assertSimpleType(cb()));\n\n return cacheFn as any;\n}\n\n// Types are limited here so that in the future these values can be used\n// as part of Babel's caching logic.\nexport type SimpleType =\n | string\n | boolean\n | number\n | null\n | void\n | Promise;\nexport function assertSimpleType(value: unknown): SimpleType {\n if (isThenable(value)) {\n throw new Error(\n `You appear to be using an async cache handler, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously handle your caching logic.`,\n );\n }\n\n if (\n value != null &&\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n typeof value !== \"number\"\n ) {\n throw new Error(\n \"Cache keys must be either string, boolean, number, null, or undefined.\",\n );\n }\n // @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed\n // when strictNullCheck is enabled\n return value;\n}\n\nclass Lock {\n released: boolean = false;\n promise: Promise;\n _resolve: (value: T) => void;\n\n constructor() {\n this.promise = new Promise(resolve => {\n this._resolve = resolve;\n });\n }\n\n release(value: T) {\n this.released = true;\n this._resolve(value);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAOA;AAmBA,MAAMA,WAAW,GACfC,GAAyC,IACP;EAClC,OAAOC,UAAO,CAACD,GAAG,CAAC,CAACE,IAAI;AAC1B,CAAC;AAGD,UAA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,wEAAwE,CACzE;EACH;EAGA,OAAOnC,KAAK;AACd;AAEA,MAAMiB,IAAI,CAAI;EAKZQ,WAAW,GAAG;IAAA,KAJdwB,QAAQ,GAAY,KAAK;IAAA,KACzBlC,OAAO;IAAA,KACPmC,QAAQ;IAGN,IAAI,CAACnC,OAAO,GAAG,IAAIoC,OAAO,CAACC,OAAO,IAAI;MACpC,IAAI,CAACF,QAAQ,GAAGE,OAAO;IACzB,CAAC,CAAC;EACJ;EAEA1C,OAAO,CAACV,KAAQ,EAAE;IAChB,IAAI,CAACiD,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,QAAQ,CAAClD,KAAK,CAAC;EACtB;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_async","_util","synchronize","gen","gensync","sync","genTrue","makeWeakCache","handler","makeCachedFunction","WeakMap","makeWeakCacheSync","makeStrongCache","Map","makeStrongCacheSync","CallCache","callCacheSync","callCacheAsync","futureCache","cachedFunction","arg","asyncContext","isAsync","callCache","cached","getCachedValueOrWait","valid","value","cache","CacheConfigurator","handlerResult","finishLock","isIterableIterator","onFirstPause","setupAsyncLocks","updateFunctionCache","delete","release","getCachedValue","cachedValue","get","waitFor","promise","config","Lock","configured","forever","deactivate","mode","set","validator","push","constructor","_active","_never","_forever","_invalidate","_configured","_pairs","_data","simple","makeSimpleConfigurator","Error","never","using","key","fn","maybeAsync","isThenable","then","invalidate","pairs","cacheFn","val","assertSimpleType","cb","released","_resolve","Promise","resolve"],"sources":["../../src/config/caching.ts"],"sourcesContent":["import gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport {\n maybeAsync,\n isAsync,\n onFirstPause,\n waitFor,\n isThenable,\n} from \"../gensync-utils/async\";\nimport { isIterableIterator } from \"./util\";\n\nexport type { CacheConfigurator };\n\nexport type SimpleCacheConfigurator = {\n (forever: boolean): void;\n (handler: () => T): T;\n\n forever: () => void;\n never: () => void;\n using: (handler: () => T) => T;\n invalidate: (handler: () => T) => T;\n};\n\nexport type CacheEntry = Array<{\n value: ResultT;\n valid: (channel: SideChannel) => Handler;\n}>;\n\nconst synchronize = (\n gen: (...args: ArgsT) => Handler,\n): ((...args: ArgsT) => ResultT) => {\n return gensync(gen).sync;\n};\n\n// eslint-disable-next-line require-yield\nfunction* genTrue() {\n return true;\n}\n\nexport function makeWeakCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(WeakMap, handler);\n}\n\nexport function makeWeakCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeWeakCache(handler),\n );\n}\n\nexport function makeStrongCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(Map, handler);\n}\n\nexport function makeStrongCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeStrongCache(handler),\n );\n}\n\n/* NOTE: Part of the logic explained in this comment is explained in the\n * getCachedValueOrWait and setupAsyncLocks functions.\n *\n * > There are only two hard things in Computer Science: cache invalidation and naming things.\n * > -- Phil Karlton\n *\n * I don't know if Phil was also thinking about handling a cache whose invalidation function is\n * defined asynchronously is considered, but it is REALLY hard to do correctly.\n *\n * The implemented logic (only when gensync is run asynchronously) is the following:\n * 1. If there is a valid cache associated to the current \"arg\" parameter,\n * a. RETURN the cached value\n * 3. If there is a FinishLock associated to the current \"arg\" parameter representing a valid cache,\n * a. Wait for that lock to be released\n * b. RETURN the value associated with that lock\n * 5. Start executing the function to be cached\n * a. If it pauses on a promise, then\n * i. Let FinishLock be a new lock\n * ii. Store FinishLock as associated to the current \"arg\" parameter\n * iii. Wait for the function to finish executing\n * iv. Release FinishLock\n * v. Send the function result to anyone waiting on FinishLock\n * 6. Store the result in the cache\n * 7. RETURN the result\n */\nfunction makeCachedFunction(\n CallCache: new () => CacheMap,\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n const callCacheSync = new CallCache();\n const callCacheAsync = new CallCache();\n const futureCache = new CallCache>();\n\n return function* cachedFunction(arg: ArgT, data: SideChannel) {\n const asyncContext = yield* isAsync();\n const callCache = asyncContext ? callCacheAsync : callCacheSync;\n\n const cached = yield* getCachedValueOrWait(\n asyncContext,\n callCache,\n futureCache,\n arg,\n data,\n );\n if (cached.valid) return cached.value;\n\n const cache = new CacheConfigurator(data);\n\n const handlerResult: Handler | ResultT = handler(arg, cache);\n\n let finishLock: Lock;\n let value: ResultT;\n\n if (isIterableIterator(handlerResult)) {\n value = yield* onFirstPause(handlerResult, () => {\n finishLock = setupAsyncLocks(cache, futureCache, arg);\n });\n } else {\n value = handlerResult;\n }\n\n updateFunctionCache(callCache, cache, arg, value);\n\n if (finishLock) {\n futureCache.delete(arg);\n finishLock.release(value);\n }\n\n return value;\n };\n}\n\ntype CacheMap =\n | Map>\n // @ts-expect-error todo(flow->ts): add `extends object` constraint to ArgT\n | WeakMap>;\n\nfunction* getCachedValue(\n cache: CacheMap,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cachedValue: CacheEntry | void = cache.get(arg);\n\n if (cachedValue) {\n for (const { value, valid } of cachedValue) {\n if (yield* valid(data)) return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction* getCachedValueOrWait(\n asyncContext: boolean,\n callCache: CacheMap,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cached = yield* getCachedValue(callCache, arg, data);\n if (cached.valid) {\n return cached;\n }\n\n if (asyncContext) {\n const cached = yield* getCachedValue(futureCache, arg, data);\n if (cached.valid) {\n const value = yield* waitFor(cached.value.promise);\n return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction setupAsyncLocks(\n config: CacheConfigurator,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n): Lock {\n const finishLock = new Lock();\n\n updateFunctionCache(futureCache, config, arg, finishLock);\n\n return finishLock;\n}\n\nfunction updateFunctionCache<\n ArgT,\n ResultT,\n SideChannel,\n Cache extends CacheMap,\n>(\n cache: Cache,\n config: CacheConfigurator,\n arg: ArgT,\n value: ResultT,\n) {\n if (!config.configured()) config.forever();\n\n let cachedValue: CacheEntry | void = cache.get(arg);\n\n config.deactivate();\n\n switch (config.mode()) {\n case \"forever\":\n cachedValue = [{ value, valid: genTrue }];\n cache.set(arg, cachedValue);\n break;\n case \"invalidate\":\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n break;\n case \"valid\":\n if (cachedValue) {\n cachedValue.push({ value, valid: config.validator() });\n } else {\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n }\n }\n}\n\nclass CacheConfigurator {\n _active: boolean = true;\n _never: boolean = false;\n _forever: boolean = false;\n _invalidate: boolean = false;\n\n _configured: boolean = false;\n\n _pairs: Array<\n [cachedValue: unknown, handler: (data: SideChannel) => Handler]\n > = [];\n\n _data: SideChannel;\n\n constructor(data: SideChannel) {\n this._data = data;\n }\n\n simple() {\n return makeSimpleConfigurator(this);\n }\n\n mode() {\n if (this._never) return \"never\";\n if (this._forever) return \"forever\";\n if (this._invalidate) return \"invalidate\";\n return \"valid\";\n }\n\n forever() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never) {\n throw new Error(\"Caching has already been configured with .never()\");\n }\n this._forever = true;\n this._configured = true;\n }\n\n never() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._forever) {\n throw new Error(\"Caching has already been configured with .forever()\");\n }\n this._never = true;\n this._configured = true;\n }\n\n using(handler: (data: SideChannel) => T): T {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never || this._forever) {\n throw new Error(\n \"Caching has already been configured with .never or .forever()\",\n );\n }\n this._configured = true;\n\n const key = handler(this._data);\n\n const fn = maybeAsync(\n handler,\n `You appear to be using an async cache handler, but Babel has been called synchronously`,\n );\n\n if (isThenable(key)) {\n // @ts-expect-error todo(flow->ts): improve function return type annotation\n return key.then((key: unknown) => {\n this._pairs.push([key, fn]);\n return key;\n });\n }\n\n this._pairs.push([key, fn]);\n return key;\n }\n\n invalidate(handler: (data: SideChannel) => T): T {\n this._invalidate = true;\n return this.using(handler);\n }\n\n validator(): (data: SideChannel) => Handler {\n const pairs = this._pairs;\n return function* (data: SideChannel) {\n for (const [key, fn] of pairs) {\n if (key !== (yield* fn(data))) return false;\n }\n return true;\n };\n }\n\n deactivate() {\n this._active = false;\n }\n\n configured() {\n return this._configured;\n }\n}\n\nfunction makeSimpleConfigurator(\n cache: CacheConfigurator,\n): SimpleCacheConfigurator {\n function cacheFn(val: any) {\n if (typeof val === \"boolean\") {\n if (val) cache.forever();\n else cache.never();\n return;\n }\n\n return cache.using(() => assertSimpleType(val()));\n }\n cacheFn.forever = () => cache.forever();\n cacheFn.never = () => cache.never();\n cacheFn.using = (cb: { (): SimpleType }) =>\n cache.using(() => assertSimpleType(cb()));\n cacheFn.invalidate = (cb: { (): SimpleType }) =>\n cache.invalidate(() => assertSimpleType(cb()));\n\n return cacheFn as any;\n}\n\n// Types are limited here so that in the future these values can be used\n// as part of Babel's caching logic.\nexport type SimpleType =\n | string\n | boolean\n | number\n | null\n | void\n | Promise;\nexport function assertSimpleType(value: unknown): SimpleType {\n if (isThenable(value)) {\n throw new Error(\n `You appear to be using an async cache handler, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously handle your caching logic.`,\n );\n }\n\n if (\n value != null &&\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n typeof value !== \"number\"\n ) {\n throw new Error(\n \"Cache keys must be either string, boolean, number, null, or undefined.\",\n );\n }\n // @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed\n // when strictNullCheck is enabled\n return value;\n}\n\nclass Lock {\n released: boolean = false;\n promise: Promise;\n _resolve: (value: T) => void;\n\n constructor() {\n this.promise = new Promise(resolve => {\n this._resolve = resolve;\n });\n }\n\n release(value: T) {\n this.released = true;\n this._resolve(value);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AAmBA,MAAMG,WAAW,GACfC,GAAyC,IACP;EAClC,OAAOC,UAAO,CAACD,GAAG,CAAC,CAACE,IAAI;AAC1B,CAAC;AAGD,UAAUC,OAAOA,CAAA,EAAG;EAClB,OAAO,IAAI;AACb;AAEO,SAASC,aAAaA,CAC3BC,OAG+B,EACqB;EACpD,OAAOC,kBAAkB,CAA6BC,OAAO,EAAEF,OAAO,CAAC;AACzE;AAEO,SAASG,iBAAiBA,CAC/BH,OAAuE,EAC3B;EAC5C,OAAON,WAAW,CAChBK,aAAa,CAA6BC,OAAO,CAAC,CACnD;AACH;AAEO,SAASI,eAAeA,CAC7BJ,OAG+B,EACqB;EACpD,OAAOC,kBAAkB,CAA6BI,GAAG,EAAEL,OAAO,CAAC;AACrE;AAEO,SAASM,mBAAmBA,CACjCN,OAAuE,EAC3B;EAC5C,OAAON,WAAW,CAChBU,eAAe,CAA6BJ,OAAO,CAAC,CACrD;AACH;AA2BA,SAASC,kBAAkBA,CACzBM,SAAgE,EAChEP,OAG+B,EACqB;EACpD,MA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} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-chain.js.map b/node_modules/@babel/core/lib/config/config-chain.js.map index a4c4c9865..352dfdd7e 100644 --- a/node_modules/@babel/core/lib/config/config-chain.js.map +++ b/node_modules/@babel/core/lib/config/config-chain.js.map @@ -1 +1 @@ -{"version":3,"names":["debug","buildDebug","buildPresetChain","arg","context","chain","buildPresetChainWalker","plugins","dedupDescriptors","presets","options","map","o","normalizeOptions","files","Set","makeChainWalker","root","preset","loadPresetDescriptors","env","envName","loadPresetEnvDescriptors","overrides","index","loadPresetOverridesDescriptors","overridesEnv","loadPresetOverridesEnvDescriptors","createLogger","makeWeakCacheSync","buildRootDescriptors","alias","createUncachedDescriptors","makeStrongCacheSync","buildEnvDescriptors","buildOverrideDescriptors","buildOverrideEnvDescriptors","buildRootChain","opts","configReport","babelRcReport","programmaticLogger","ConfigPrinter","programmaticChain","loadProgrammaticChain","dirname","cwd","undefined","programmaticReport","output","configFile","loadConfig","caller","findRootConfig","babelrc","babelrcRoots","babelrcRootsDirectory","configFileChain","emptyChain","configFileLogger","validatedFile","validateConfigFile","result","loadFileChain","mergeChain","ignoreFile","babelrcFile","isIgnored","fileChain","filename","pkgData","findPackageData","babelrcLoadEnabled","ignore","config","findRelativeConfig","add","filepath","shouldIgnore","validateBabelrcFile","babelrcLogger","showConfig","console","log","filter","x","join","fileHandling","absoluteRoot","directories","indexOf","babelrcPatterns","Array","isArray","pat","path","resolve","length","some","pathPatternToRegex","directory","matchPattern","file","validate","validateExtendFile","input","createCachedDescriptors","baseLogger","buildProgrammaticLogger","loadFileChainWalker","loadFileDescriptors","loadFileEnvDescriptors","loadFileOverridesDescriptors","loadFileOverridesEnvDescriptors","buildFileLogger","configure","ChainFormatter","Config","descriptors","_","Programmatic","callerName","name","Error","override","chainWalker","flattenedConfigs","rootOpts","configIsApplicable","push","envOpts","forEach","overrideOps","overrideEnvOpts","only","logger","mergeExtendsChain","mergeChainOpts","extends","has","from","delete","target","source","passPerPreset","test","include","exclude","Object","prototype","hasOwnProperty","call","sourceMaps","sourceMap","items","Map","item","value","fnKey","nameMap","get","set","desc","ownPass","reduce","acc","configName","configFieldIsApplicable","patterns","matchesPatterns","ignoreListReplacer","_key","RegExp","String","message","JSON","stringify","pattern","pathToTest","endHiddenCallStack","ConfigError"],"sources":["../../src/config/config-chain.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options\";\nimport type {\n ValidatedOptions,\n IgnoreList,\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n IgnoreItem,\n} from \"./validation/options\";\nimport pathPatternToRegex from \"./pattern-to-regex\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace\";\nimport ConfigError from \"../errors/config-error\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors\";\n\nexport type ConfigChain = {\n plugins: Array;\n presets: Array;\n options: Array;\n files: Set;\n};\n\nexport type PresetInstance = {\n options: ValidatedOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n plugins: dedupDescriptors(chain.plugins),\n presets: dedupDescriptors(chain.presets),\n options: chain.options.map(o => normalizeOptions(o)),\n files: new Set(),\n };\n}\n\nexport const buildPresetChainWalker = makeChainWalker({\n root: preset => loadPresetDescriptors(preset),\n env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),\n overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),\n overridesEnv: (preset, index, envName) =>\n loadPresetOverridesEnvDescriptors(preset)(index)(envName),\n createLogger: () => () => {}, // Currently we don't support logging how preset is expanded\n});\nconst loadPresetDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n buildRootDescriptors(preset, preset.alias, createUncachedDescriptors),\n);\nconst loadPresetEnvDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadPresetOverridesDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadPresetOverridesEnvDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nexport type FileHandling = \"transpile\" | \"ignored\" | \"unsupported\";\nexport type RootConfigChain = ConfigChain & {\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n ignore: IgnoreFile | void;\n fileHandling: FileHandling;\n files: Set;\n};\n\n/**\n * Build a config chain for Babel's full root configuration.\n */\nexport function* buildRootChain(\n opts: ValidatedOptions,\n context: ConfigContext,\n): Handler {\n let configReport, babelRcReport;\n const programmaticLogger = new ConfigPrinter();\n const programmaticChain = yield* loadProgrammaticChain(\n {\n options: opts,\n dirname: context.cwd,\n },\n context,\n undefined,\n programmaticLogger,\n );\n if (!programmaticChain) return null;\n const programmaticReport = yield* programmaticLogger.output();\n\n let configFile;\n if (typeof opts.configFile === \"string\") {\n configFile = yield* loadConfig(\n opts.configFile,\n context.cwd,\n context.envName,\n context.caller,\n );\n } else if (opts.configFile !== false) {\n configFile = yield* findRootConfig(\n context.root,\n context.envName,\n context.caller,\n );\n }\n\n let { babelrc, babelrcRoots } = opts;\n let babelrcRootsDirectory = context.cwd;\n\n const configFileChain = emptyChain();\n const configFileLogger = new ConfigPrinter();\n if (configFile) {\n const validatedFile = validateConfigFile(configFile);\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n configFileLogger,\n );\n if (!result) return null;\n configReport = yield* configFileLogger.output();\n\n // Allow config files to toggle `.babelrc` resolution on and off and\n // specify where the roots are.\n if (babelrc === undefined) {\n babelrc = validatedFile.options.babelrc;\n }\n if (babelrcRoots === undefined) {\n babelrcRootsDirectory = validatedFile.dirname;\n babelrcRoots = validatedFile.options.babelrcRoots;\n }\n\n mergeChain(configFileChain, result);\n }\n\n let ignoreFile, babelrcFile;\n let isIgnored = false;\n const fileChain = emptyChain();\n // resolve all .babelrc files\n if (\n (babelrc === true || babelrc === undefined) &&\n typeof context.filename === \"string\"\n ) {\n const pkgData = yield* findPackageData(context.filename);\n\n if (\n pkgData &&\n babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)\n ) {\n ({ ignore: ignoreFile, config: babelrcFile } = yield* findRelativeConfig(\n pkgData,\n context.envName,\n context.caller,\n ));\n\n if (ignoreFile) {\n fileChain.files.add(ignoreFile.filepath);\n }\n\n if (\n ignoreFile &&\n shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)\n ) {\n isIgnored = true;\n }\n\n if (babelrcFile && !isIgnored) {\n const validatedFile = validateBabelrcFile(babelrcFile);\n const babelrcLogger = new ConfigPrinter();\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n babelrcLogger,\n );\n if (!result) {\n isIgnored = true;\n } else {\n babelRcReport = yield* babelrcLogger.output();\n mergeChain(fileChain, result);\n }\n }\n\n if (babelrcFile && isIgnored) {\n fileChain.files.add(babelrcFile.filepath);\n }\n }\n }\n\n if (context.showConfig) {\n console.log(\n `Babel configs on \"${context.filename}\" (ascending priority):\\n` +\n // print config by the order of ascending priority\n [configReport, babelRcReport, programmaticReport]\n .filter(x => !!x)\n .join(\"\\n\\n\") +\n \"\\n-----End Babel configs-----\",\n );\n }\n // Insert file chain in front so programmatic options have priority\n // over configuration file chain items.\n const chain = mergeChain(\n mergeChain(mergeChain(emptyChain(), configFileChain), fileChain),\n programmaticChain,\n );\n\n return {\n plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),\n presets: isIgnored ? [] : dedupDescriptors(chain.presets),\n options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),\n fileHandling: isIgnored ? \"ignored\" : \"transpile\",\n ignore: ignoreFile || undefined,\n babelrc: babelrcFile || undefined,\n config: configFile || undefined,\n files: chain.files,\n };\n}\n\nfunction babelrcLoadEnabled(\n context: ConfigContext,\n pkgData: FilePackageData,\n babelrcRoots: BabelrcSearch | undefined,\n babelrcRootsDirectory: string,\n): boolean {\n if (typeof babelrcRoots === \"boolean\") return babelrcRoots;\n\n const absoluteRoot = context.root;\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcRoots === undefined) {\n return pkgData.directories.indexOf(absoluteRoot) !== -1;\n }\n\n let babelrcPatterns = babelrcRoots;\n if (!Array.isArray(babelrcPatterns)) {\n babelrcPatterns = [babelrcPatterns as IgnoreItem];\n }\n babelrcPatterns = babelrcPatterns.map(pat => {\n return typeof pat === \"string\"\n ? path.resolve(babelrcRootsDirectory, pat)\n : pat;\n });\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {\n return pkgData.directories.indexOf(absoluteRoot) !== -1;\n }\n\n return babelrcPatterns.some(pat => {\n if (typeof pat === \"string\") {\n pat = pathPatternToRegex(pat, babelrcRootsDirectory);\n }\n\n return pkgData.directories.some(directory => {\n return matchPattern(pat, babelrcRootsDirectory, directory, context);\n });\n });\n}\n\nconst validateConfigFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"configfile\", file.options, file.filepath),\n }),\n);\n\nconst validateBabelrcFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"babelrcfile\", file.options, file.filepath),\n }),\n);\n\nconst validateExtendFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"extendsfile\", file.options, file.filepath),\n }),\n);\n\n/**\n * Build a config chain for just the programmatic options passed into Babel.\n */\nconst loadProgrammaticChain = makeChainWalker({\n root: input => buildRootDescriptors(input, \"base\", createCachedDescriptors),\n env: (input, envName) =>\n buildEnvDescriptors(input, \"base\", createCachedDescriptors, envName),\n overrides: (input, index) =>\n buildOverrideDescriptors(input, \"base\", createCachedDescriptors, index),\n overridesEnv: (input, index, envName) =>\n buildOverrideEnvDescriptors(\n input,\n \"base\",\n createCachedDescriptors,\n index,\n envName,\n ),\n createLogger: (input, context, baseLogger) =>\n buildProgrammaticLogger(input, context, baseLogger),\n});\n\n/**\n * Build a config chain for a given file.\n */\nconst loadFileChainWalker = makeChainWalker({\n root: file => loadFileDescriptors(file),\n env: (file, envName) => loadFileEnvDescriptors(file)(envName),\n overrides: (file, index) => loadFileOverridesDescriptors(file)(index),\n overridesEnv: (file, index, envName) =>\n loadFileOverridesEnvDescriptors(file)(index)(envName),\n createLogger: (file, context, baseLogger) =>\n buildFileLogger(file.filepath, context, baseLogger),\n});\n\nfunction* loadFileChain(\n input: ValidatedFile,\n context: ConfigContext,\n files: Set,\n baseLogger: ConfigPrinter,\n) {\n const chain = yield* loadFileChainWalker(input, context, files, baseLogger);\n if (chain) {\n chain.files.add(input.filepath);\n }\n\n return chain;\n}\n\nconst loadFileDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n buildRootDescriptors(file, file.filepath, createUncachedDescriptors),\n);\nconst loadFileEnvDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadFileOverridesDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadFileOverridesEnvDescriptors = makeWeakCacheSync(\n (file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nfunction buildFileLogger(\n filepath: string,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Config, {\n filepath,\n });\n}\n\nfunction buildRootDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n) {\n return descriptors(dirname, options, alias);\n}\n\nfunction buildProgrammaticLogger(\n _: unknown,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {\n callerName: context.caller?.name,\n });\n}\n\nfunction buildEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n envName: string,\n) {\n const opts = options.env && options.env[envName];\n return opts ? descriptors(dirname, opts, `${alias}.env[\"${envName}\"]`) : null;\n}\n\nfunction buildOverrideDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n) {\n const opts = options.overrides && options.overrides[index];\n if (!opts) throw new Error(\"Assertion failure - missing override\");\n\n return descriptors(dirname, opts, `${alias}.overrides[${index}]`);\n}\n\nfunction buildOverrideEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n envName: string,\n) {\n const override = options.overrides && options.overrides[index];\n if (!override) throw new Error(\"Assertion failure - missing override\");\n\n const opts = override.env && override.env[envName];\n return opts\n ? descriptors(\n dirname,\n opts,\n `${alias}.overrides[${index}].env[\"${envName}\"]`,\n )\n : null;\n}\n\nfunction makeChainWalker<\n ArgT extends {\n options: ValidatedOptions;\n dirname: string;\n filepath?: string;\n },\n>({\n root,\n env,\n overrides,\n overridesEnv,\n createLogger,\n}: {\n root: (configEntry: ArgT) => OptionsAndDescriptors;\n env: (configEntry: ArgT, env: string) => OptionsAndDescriptors | null;\n overrides: (configEntry: ArgT, index: number) => OptionsAndDescriptors;\n overridesEnv: (\n configEntry: ArgT,\n index: number,\n env: string,\n ) => OptionsAndDescriptors | null;\n createLogger: (\n configEntry: ArgT,\n context: ConfigContext,\n printer: ConfigPrinter | void,\n ) => (\n opts: OptionsAndDescriptors,\n index?: number | null,\n env?: string | null,\n ) => void;\n}): (\n configEntry: ArgT,\n context: ConfigContext,\n files?: Set,\n baseLogger?: ConfigPrinter,\n) => Handler {\n return function* chainWalker(input, context, files = new Set(), baseLogger) {\n const { dirname } = input;\n\n const flattenedConfigs: Array<{\n config: OptionsAndDescriptors;\n index: number | undefined | null;\n envName: string | undefined | null;\n }> = [];\n\n const rootOpts = root(input);\n if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: rootOpts,\n envName: undefined,\n index: undefined,\n });\n\n const envOpts = env(input, context.envName);\n if (\n envOpts &&\n configIsApplicable(envOpts, dirname, context, input.filepath)\n ) {\n flattenedConfigs.push({\n config: envOpts,\n envName: context.envName,\n index: undefined,\n });\n }\n\n (rootOpts.options.overrides || []).forEach((_, index) => {\n const overrideOps = overrides(input, index);\n if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: overrideOps,\n index,\n envName: undefined,\n });\n\n const overrideEnvOpts = overridesEnv(input, index, context.envName);\n if (\n overrideEnvOpts &&\n configIsApplicable(\n overrideEnvOpts,\n dirname,\n context,\n input.filepath,\n )\n ) {\n flattenedConfigs.push({\n config: overrideEnvOpts,\n index,\n envName: context.envName,\n });\n }\n }\n });\n }\n\n // Process 'ignore' and 'only' before 'extends' items are processed so\n // that we don't do extra work loading extended configs if a file is\n // ignored.\n if (\n flattenedConfigs.some(\n ({\n config: {\n options: { ignore, only },\n },\n }) => shouldIgnore(context, ignore, only, dirname),\n )\n ) {\n return null;\n }\n\n const chain = emptyChain();\n const logger = createLogger(input, context, baseLogger);\n\n for (const { config, index, envName } of flattenedConfigs) {\n if (\n !(yield* mergeExtendsChain(\n chain,\n config.options,\n dirname,\n context,\n files,\n baseLogger,\n ))\n ) {\n return null;\n }\n\n logger(config, index, envName);\n yield* mergeChainOpts(chain, config);\n }\n return chain;\n };\n}\n\nfunction* mergeExtendsChain(\n chain: ConfigChain,\n opts: ValidatedOptions,\n dirname: string,\n context: ConfigContext,\n files: Set,\n baseLogger?: ConfigPrinter,\n): Handler {\n if (opts.extends === undefined) return true;\n\n const file = yield* loadConfig(\n opts.extends,\n dirname,\n context.envName,\n context.caller,\n );\n\n if (files.has(file)) {\n throw new Error(\n `Configuration cycle detected loading ${file.filepath}.\\n` +\n `File already loaded following the config chain:\\n` +\n Array.from(files, file => ` - ${file.filepath}`).join(\"\\n\"),\n );\n }\n\n files.add(file);\n const fileChain = yield* loadFileChain(\n validateExtendFile(file),\n context,\n files,\n baseLogger,\n );\n files.delete(file);\n\n if (!fileChain) return false;\n\n mergeChain(chain, fileChain);\n\n return true;\n}\n\nfunction mergeChain(target: ConfigChain, source: ConfigChain): ConfigChain {\n target.options.push(...source.options);\n target.plugins.push(...source.plugins);\n target.presets.push(...source.presets);\n for (const file of source.files) {\n target.files.add(file);\n }\n\n return target;\n}\n\nfunction* mergeChainOpts(\n target: ConfigChain,\n { options, plugins, presets }: OptionsAndDescriptors,\n): Handler {\n target.options.push(options);\n target.plugins.push(...(yield* plugins()));\n target.presets.push(...(yield* presets()));\n\n return target;\n}\n\nfunction emptyChain(): ConfigChain {\n return {\n options: [],\n presets: [],\n plugins: [],\n files: new Set(),\n };\n}\n\nfunction normalizeOptions(opts: ValidatedOptions): ValidatedOptions {\n const options = {\n ...opts,\n };\n delete options.extends;\n delete options.env;\n delete options.overrides;\n delete options.plugins;\n delete options.presets;\n delete options.passPerPreset;\n delete options.ignore;\n delete options.only;\n delete options.test;\n delete options.include;\n delete options.exclude;\n\n // \"sourceMap\" is just aliased to sourceMap, so copy it over as\n // we merge the options together.\n if (Object.prototype.hasOwnProperty.call(options, \"sourceMap\")) {\n options.sourceMaps = options.sourceMap;\n delete options.sourceMap;\n }\n return options;\n}\n\nfunction dedupDescriptors(\n items: Array,\n): Array {\n const map: Map<\n Function,\n Map\n > = new Map();\n\n const descriptors = [];\n\n for (const item of items) {\n if (typeof item.value === \"function\") {\n const fnKey = item.value;\n let nameMap = map.get(fnKey);\n if (!nameMap) {\n nameMap = new Map();\n map.set(fnKey, nameMap);\n }\n let desc = nameMap.get(item.name);\n if (!desc) {\n desc = { value: item };\n descriptors.push(desc);\n\n // Treat passPerPreset presets as unique, skipping them\n // in the merge processing steps.\n if (!item.ownPass) nameMap.set(item.name, desc);\n } else {\n desc.value = item;\n }\n } else {\n descriptors.push({ value: item });\n }\n }\n\n return descriptors.reduce((acc, desc) => {\n acc.push(desc.value);\n return acc;\n }, []);\n}\n\nfunction configIsApplicable(\n { options }: OptionsAndDescriptors,\n dirname: string,\n context: ConfigContext,\n configName: string,\n): boolean {\n return (\n (options.test === undefined ||\n configFieldIsApplicable(context, options.test, dirname, configName)) &&\n (options.include === undefined ||\n configFieldIsApplicable(context, options.include, dirname, configName)) &&\n (options.exclude === undefined ||\n !configFieldIsApplicable(context, options.exclude, dirname, configName))\n );\n}\n\nfunction configFieldIsApplicable(\n context: ConfigContext,\n test: ConfigApplicableTest,\n dirname: string,\n configName: string,\n): boolean {\n const patterns = Array.isArray(test) ? test : [test];\n\n return matchesPatterns(context, patterns, dirname, configName);\n}\n\n/**\n * Print the ignoreList-values in a more helpful way than the default.\n */\nfunction ignoreListReplacer(\n _key: string,\n value: IgnoreList | IgnoreItem,\n): IgnoreList | IgnoreItem | string {\n if (value instanceof RegExp) {\n return String(value);\n }\n\n return value;\n}\n\n/**\n * Tests if a filename should be ignored based on \"ignore\" and \"only\" options.\n */\nfunction shouldIgnore(\n context: ConfigContext,\n ignore: IgnoreList | undefined | null,\n only: IgnoreList | undefined | null,\n dirname: string,\n): boolean {\n if (ignore && matchesPatterns(context, ignore, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it matches one of \\`ignore: ${JSON.stringify(\n ignore,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n if (only && !matchesPatterns(context, only, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it fails to match one of \\`only: ${JSON.stringify(\n only,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns result of calling function with filename if pattern is a function.\n * Otherwise returns result of matching pattern Regex with filename.\n */\nfunction matchesPatterns(\n context: ConfigContext,\n patterns: IgnoreList,\n dirname: string,\n configName?: string,\n): boolean {\n return patterns.some(pattern =>\n matchPattern(pattern, dirname, context.filename, context, configName),\n );\n}\n\nfunction matchPattern(\n pattern: IgnoreItem,\n dirname: string,\n pathToTest: string | undefined,\n context: ConfigContext,\n configName?: string,\n): boolean {\n if (typeof pattern === \"function\") {\n return !!endHiddenCallStack(pattern)(pathToTest, {\n dirname,\n envName: context.envName,\n caller: context.caller,\n });\n }\n\n if (typeof pathToTest !== \"string\") {\n throw new ConfigError(\n `Configuration contains string/RegExp pattern, but no filename was passed to Babel`,\n configName,\n );\n }\n\n if (typeof pattern === \"string\") {\n pattern = pathPatternToRegex(pattern, dirname);\n }\n return pattern.test(pathToTest);\n}\n"],"mappings":";;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AASA;AACA;AAGA;AACA;AAIA;AAQA;AAEA;AAZA,MAAMA,KAAK,GAAGC,QAAU,CAAC,2BAA2B,CAAC;AAgD9C,UAAUC,gBAAgB,CAC/BC,GAAmB,EACnBC,OAAY,EACiB;EAC7B,MAAMC,KAAK,GAAG,OAAOC,sBAAsB,CAACH,GAAG,EAAEC,OAAO,CAAC;EACzD,IAAI,CAACC,KAAK,EAAE,OAAO,IAAI;EAEvB,OAAO;IACLE,OAAO,EAAEC,gBAAgB,CAACH,KAAK,CAACE,OAAO,CAAC;IACxCE,OAAO,EAAED,gBAAgB,CAACH,KAAK,CAACI,OAAO,CAAC;IACxCC,OAAO,EAAEL,KAAK,CAACK,OAAO,CAACC,GAAG,CAACC,CAAC,IAAIC,gBAAgB,CAACD,CAAC,CAAC,CAAC;IACpDE,KAAK,EAAE,IAAIC,GAAG;EAChB,CAAC;AACH;AAEO,MAAMT,sBAAsB,GAAGU,eAAe,CAAiB;EACpEC,IAAI,EAAEC,MAAM,IAAIC,qBAAqB,CAACD,MAAM,CAAC;EAC7CE,GAAG,EAAE,CAACF,MAA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AAO,CAACiE,QAAQ,EAAEjE,OAAO,EAAEkK,UAAU,CAAC,CACtE;AACH;AAEA,SAASjE,YAAY,CACnB4E,OAAmB,EACnBpI,OAAe,EACfqI,UAA8B,EAC9B9K,OAAsB,EACtBkK,UAAmB,EACV;EACT,IAAI,OAAOW,OAAO,KAAK,UAAU,EAAE;IACjC,OAAO,CAAC,CAAC,IAAAE,qCAAkB,EAACF,OAAO,CAAC,CAACC,UAAU,EAAE;MAC/CrI,OAAO;MACPxB,OAAO,EAAEjB,OAAO,CAACiB,OAAO;MACxB+B,MAAM,EAAEhD,OAAO,CAACgD;IAClB,CAAC,CAAC;EACJ;EAEA,IAAI,OAAO8H,UAAU,KAAK,QAAQ,EAAE;IAClC,MAAM,IAAIE,oBAAW,CAClB,mFAAkF,EACnFd,UAAU,CACX;EACH;EAEA,IAAI,OAAOW,OAAO,KAAK,QAAQ,EAAE;IAC/BA,OAAO,GAAG,IAAA9E,uBAAkB,EAAC8E,OAAO,EAAEpI,OAAO,CAAC;EAChD;EACA,OAAOoI,OAAO,CAAChC,IAAI,CAACiC,UAAU,CAAC;AACjC;AAAC"} \ No newline at end of file +{"version":3,"names":["_path","data","require","_debug","_options","_patternToRegex","_printer","_rewriteStackTrace","_configError","_files","_caching","_configDescriptors","debug","buildDebug","buildPresetChain","arg","context","chain","buildPresetChainWalker","plugins","dedupDescriptors","presets","options","map","o","normalizeOptions","files","Set","makeChainWalker","root","preset","loadPresetDescriptors","env","envName","loadPresetEnvDescriptors","overrides","index","loadPresetOverridesDescriptors","overridesEnv","loadPresetOverridesEnvDescriptors","createLogger","exports","makeWeakCacheSync","buildRootDescriptors","alias","createUncachedDescriptors","makeStrongCacheSync","buildEnvDescriptors","buildOverrideDescriptors","buildOverrideEnvDescriptors","buildRootChain","opts","configReport","babelRcReport","programmaticLogger","ConfigPrinter","programmaticChain","loadProgrammaticChain","dirname","cwd","undefined","programmaticReport","output","configFile","loadConfig","caller","findRootConfig","babelrc","babelrcRoots","babelrcRootsDirectory","configFileChain","emptyChain","configFileLogger","validatedFile","validateConfigFile","result","loadFileChain","mergeChain","ignoreFile","babelrcFile","isIgnored","fileChain","filename","pkgData","findPackageData","babelrcLoadEnabled","ignore","config","findRelativeConfig","add","filepath","shouldIgnore","validateBabelrcFile","babelrcLogger","showConfig","console","log","filter","x","join","fileHandling","absoluteRoot","directories","indexOf","babelrcPatterns","Array","isArray","pat","path","resolve","length","some","pathPatternToRegex","directory","matchPattern","file","validate","validateExtendFile","input","createCachedDescriptors","baseLogger","buildProgrammaticLogger","loadFileChainWalker","loadFileDescriptors","loadFileEnvDescriptors","loadFileOverridesDescriptors","loadFileOverridesEnvDescriptors","buildFileLogger","configure","ChainFormatter","Config","descriptors","_","_context$caller","Programmatic","callerName","name","Error","override","chainWalker","flattenedConfigs","rootOpts","configIsApplicable","push","envOpts","forEach","overrideOps","overrideEnvOpts","only","logger","mergeExtendsChain","mergeChainOpts","extends","has","from","delete","target","source","Object","assign","passPerPreset","test","include","exclude","prototype","hasOwnProperty","call","sourceMaps","sourceMap","items","Map","item","value","fnKey","nameMap","get","set","desc","ownPass","reduce","acc","configName","configFieldIsApplicable","patterns","matchesPatterns","ignoreListReplacer","_key","RegExp","String","_context$filename","message","JSON","stringify","_context$filename2","pattern","pathToTest","endHiddenCallStack","ConfigError"],"sources":["../../src/config/config-chain.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options\";\nimport type {\n ValidatedOptions,\n IgnoreList,\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n IgnoreItem,\n} from \"./validation/options\";\nimport pathPatternToRegex from \"./pattern-to-regex\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace\";\nimport ConfigError from \"../errors/config-error\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors\";\n\nexport type ConfigChain = {\n plugins: Array;\n presets: Array;\n options: Array;\n files: Set;\n};\n\nexport type PresetInstance = {\n options: ValidatedOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n plugins: dedupDescriptors(chain.plugins),\n presets: dedupDescriptors(chain.presets),\n options: chain.options.map(o => normalizeOptions(o)),\n files: new Set(),\n };\n}\n\nexport const buildPresetChainWalker = makeChainWalker({\n root: preset => loadPresetDescriptors(preset),\n env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),\n overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),\n overridesEnv: (preset, index, envName) =>\n loadPresetOverridesEnvDescriptors(preset)(index)(envName),\n createLogger: () => () => {}, // Currently we don't support logging how preset is expanded\n});\nconst loadPresetDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n buildRootDescriptors(preset, preset.alias, createUncachedDescriptors),\n);\nconst loadPresetEnvDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadPresetOverridesDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadPresetOverridesEnvDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nexport type FileHandling = \"transpile\" | \"ignored\" | \"unsupported\";\nexport type RootConfigChain = ConfigChain & {\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n ignore: IgnoreFile | void;\n fileHandling: FileHandling;\n files: Set;\n};\n\n/**\n * Build a config chain for Babel's full root configuration.\n */\nexport function* buildRootChain(\n opts: ValidatedOptions,\n context: ConfigContext,\n): Handler {\n let configReport, babelRcReport;\n const programmaticLogger = new ConfigPrinter();\n const programmaticChain = yield* loadProgrammaticChain(\n {\n options: opts,\n dirname: context.cwd,\n },\n context,\n undefined,\n programmaticLogger,\n );\n if (!programmaticChain) return null;\n const programmaticReport = yield* programmaticLogger.output();\n\n let configFile;\n if (typeof opts.configFile === \"string\") {\n configFile = yield* loadConfig(\n opts.configFile,\n context.cwd,\n context.envName,\n context.caller,\n );\n } else if (opts.configFile !== false) {\n configFile = yield* findRootConfig(\n context.root,\n context.envName,\n context.caller,\n );\n }\n\n let { babelrc, babelrcRoots } = opts;\n let babelrcRootsDirectory = context.cwd;\n\n const configFileChain = emptyChain();\n const configFileLogger = new ConfigPrinter();\n if (configFile) {\n const validatedFile = validateConfigFile(configFile);\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n configFileLogger,\n );\n if (!result) return null;\n configReport = yield* configFileLogger.output();\n\n // Allow config files to toggle `.babelrc` resolution on and off and\n // specify where the roots are.\n if (babelrc === undefined) {\n babelrc = validatedFile.options.babelrc;\n }\n if (babelrcRoots === undefined) {\n babelrcRootsDirectory = validatedFile.dirname;\n babelrcRoots = validatedFile.options.babelrcRoots;\n }\n\n mergeChain(configFileChain, result);\n }\n\n let ignoreFile, babelrcFile;\n let isIgnored = false;\n const fileChain = emptyChain();\n // resolve all .babelrc files\n if (\n (babelrc === true || babelrc === undefined) &&\n typeof context.filename === \"string\"\n ) {\n const pkgData = yield* findPackageData(context.filename);\n\n if (\n pkgData &&\n babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)\n ) {\n ({ ignore: ignoreFile, config: babelrcFile } = yield* findRelativeConfig(\n pkgData,\n context.envName,\n context.caller,\n ));\n\n if (ignoreFile) {\n fileChain.files.add(ignoreFile.filepath);\n }\n\n if (\n ignoreFile &&\n shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)\n ) {\n isIgnored = true;\n }\n\n if (babelrcFile && !isIgnored) {\n const validatedFile = validateBabelrcFile(babelrcFile);\n const babelrcLogger = new ConfigPrinter();\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n babelrcLogger,\n );\n if (!result) {\n isIgnored = true;\n } else {\n babelRcReport = yield* babelrcLogger.output();\n mergeChain(fileChain, result);\n }\n }\n\n if (babelrcFile && isIgnored) {\n fileChain.files.add(babelrcFile.filepath);\n }\n }\n }\n\n if (context.showConfig) {\n console.log(\n `Babel configs on \"${context.filename}\" (ascending priority):\\n` +\n // print config by the order of ascending priority\n [configReport, babelRcReport, programmaticReport]\n .filter(x => !!x)\n .join(\"\\n\\n\") +\n \"\\n-----End Babel configs-----\",\n );\n }\n // Insert file chain in front so programmatic options have priority\n // over configuration file chain items.\n const chain = mergeChain(\n mergeChain(mergeChain(emptyChain(), configFileChain), fileChain),\n programmaticChain,\n );\n\n return {\n plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),\n presets: isIgnored ? [] : dedupDescriptors(chain.presets),\n options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),\n fileHandling: isIgnored ? \"ignored\" : \"transpile\",\n ignore: ignoreFile || undefined,\n babelrc: babelrcFile || undefined,\n config: configFile || undefined,\n files: chain.files,\n };\n}\n\nfunction babelrcLoadEnabled(\n context: ConfigContext,\n pkgData: FilePackageData,\n babelrcRoots: BabelrcSearch | undefined,\n babelrcRootsDirectory: string,\n): boolean {\n if (typeof babelrcRoots === \"boolean\") return babelrcRoots;\n\n const absoluteRoot = context.root;\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcRoots === undefined) {\n return pkgData.directories.indexOf(absoluteRoot) !== -1;\n }\n\n let babelrcPatterns = babelrcRoots;\n if (!Array.isArray(babelrcPatterns)) {\n babelrcPatterns = [babelrcPatterns as IgnoreItem];\n }\n babelrcPatterns = babelrcPatterns.map(pat => {\n return typeof pat === \"string\"\n ? path.resolve(babelrcRootsDirectory, pat)\n : pat;\n });\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {\n return pkgData.directories.indexOf(absoluteRoot) !== -1;\n }\n\n return babelrcPatterns.some(pat => {\n if (typeof pat === \"string\") {\n pat = pathPatternToRegex(pat, babelrcRootsDirectory);\n }\n\n return pkgData.directories.some(directory => {\n return matchPattern(pat, babelrcRootsDirectory, directory, context);\n });\n });\n}\n\nconst validateConfigFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"configfile\", file.options, file.filepath),\n }),\n);\n\nconst validateBabelrcFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"babelrcfile\", file.options, file.filepath),\n }),\n);\n\nconst validateExtendFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"extendsfile\", file.options, file.filepath),\n }),\n);\n\n/**\n * Build a config chain for just the programmatic options passed into Babel.\n */\nconst loadProgrammaticChain = makeChainWalker({\n root: input => buildRootDescriptors(input, \"base\", createCachedDescriptors),\n env: (input, envName) =>\n buildEnvDescriptors(input, \"base\", createCachedDescriptors, envName),\n overrides: (input, index) =>\n buildOverrideDescriptors(input, \"base\", createCachedDescriptors, index),\n overridesEnv: (input, index, envName) =>\n buildOverrideEnvDescriptors(\n input,\n \"base\",\n createCachedDescriptors,\n index,\n envName,\n ),\n createLogger: (input, context, baseLogger) =>\n buildProgrammaticLogger(input, context, baseLogger),\n});\n\n/**\n * Build a config chain for a given file.\n */\nconst loadFileChainWalker = makeChainWalker({\n root: file => loadFileDescriptors(file),\n env: (file, envName) => loadFileEnvDescriptors(file)(envName),\n overrides: (file, index) => loadFileOverridesDescriptors(file)(index),\n overridesEnv: (file, index, envName) =>\n loadFileOverridesEnvDescriptors(file)(index)(envName),\n createLogger: (file, context, baseLogger) =>\n buildFileLogger(file.filepath, context, baseLogger),\n});\n\nfunction* loadFileChain(\n input: ValidatedFile,\n context: ConfigContext,\n files: Set,\n baseLogger: ConfigPrinter,\n) {\n const chain = yield* loadFileChainWalker(input, context, files, baseLogger);\n if (chain) {\n chain.files.add(input.filepath);\n }\n\n return chain;\n}\n\nconst loadFileDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n buildRootDescriptors(file, file.filepath, createUncachedDescriptors),\n);\nconst loadFileEnvDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadFileOverridesDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadFileOverridesEnvDescriptors = makeWeakCacheSync(\n (file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nfunction buildFileLogger(\n filepath: string,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Config, {\n filepath,\n });\n}\n\nfunction buildRootDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n) {\n return descriptors(dirname, options, alias);\n}\n\nfunction buildProgrammaticLogger(\n _: unknown,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {\n callerName: context.caller?.name,\n });\n}\n\nfunction buildEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n envName: string,\n) {\n const opts = options.env && options.env[envName];\n return opts ? descriptors(dirname, opts, `${alias}.env[\"${envName}\"]`) : null;\n}\n\nfunction buildOverrideDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n) {\n const opts = options.overrides && options.overrides[index];\n if (!opts) throw new Error(\"Assertion failure - missing override\");\n\n return descriptors(dirname, opts, `${alias}.overrides[${index}]`);\n}\n\nfunction buildOverrideEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n envName: string,\n) {\n const override = options.overrides && options.overrides[index];\n if (!override) throw new Error(\"Assertion failure - missing override\");\n\n const opts = override.env && override.env[envName];\n return opts\n ? descriptors(\n dirname,\n opts,\n `${alias}.overrides[${index}].env[\"${envName}\"]`,\n )\n : null;\n}\n\nfunction makeChainWalker<\n ArgT extends {\n options: ValidatedOptions;\n dirname: string;\n filepath?: string;\n },\n>({\n root,\n env,\n overrides,\n overridesEnv,\n createLogger,\n}: {\n root: (configEntry: ArgT) => OptionsAndDescriptors;\n env: (configEntry: ArgT, env: string) => OptionsAndDescriptors | null;\n overrides: (configEntry: ArgT, index: number) => OptionsAndDescriptors;\n overridesEnv: (\n configEntry: ArgT,\n index: number,\n env: string,\n ) => OptionsAndDescriptors | null;\n createLogger: (\n configEntry: ArgT,\n context: ConfigContext,\n printer: ConfigPrinter | void,\n ) => (\n opts: OptionsAndDescriptors,\n index?: number | null,\n env?: string | null,\n ) => void;\n}): (\n configEntry: ArgT,\n context: ConfigContext,\n files?: Set,\n baseLogger?: ConfigPrinter,\n) => Handler {\n return function* chainWalker(input, context, files = new Set(), baseLogger) {\n const { dirname } = input;\n\n const flattenedConfigs: Array<{\n config: OptionsAndDescriptors;\n index: number | undefined | null;\n envName: string | undefined | null;\n }> = [];\n\n const rootOpts = root(input);\n if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: rootOpts,\n envName: undefined,\n index: undefined,\n });\n\n const envOpts = env(input, context.envName);\n if (\n envOpts &&\n configIsApplicable(envOpts, dirname, context, input.filepath)\n ) {\n flattenedConfigs.push({\n config: envOpts,\n envName: context.envName,\n index: undefined,\n });\n }\n\n (rootOpts.options.overrides || []).forEach((_, index) => {\n const overrideOps = overrides(input, index);\n if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: overrideOps,\n index,\n envName: undefined,\n });\n\n const overrideEnvOpts = overridesEnv(input, index, context.envName);\n if (\n overrideEnvOpts &&\n configIsApplicable(\n overrideEnvOpts,\n dirname,\n context,\n input.filepath,\n )\n ) {\n flattenedConfigs.push({\n config: overrideEnvOpts,\n index,\n envName: context.envName,\n });\n }\n }\n });\n }\n\n // Process 'ignore' and 'only' before 'extends' items are processed so\n // that we don't do extra work loading extended configs if a file is\n // ignored.\n if (\n flattenedConfigs.some(\n ({\n config: {\n options: { ignore, only },\n },\n }) => shouldIgnore(context, ignore, only, dirname),\n )\n ) {\n return null;\n }\n\n const chain = emptyChain();\n const logger = createLogger(input, context, baseLogger);\n\n for (const { config, index, envName } of flattenedConfigs) {\n if (\n !(yield* mergeExtendsChain(\n chain,\n config.options,\n dirname,\n context,\n files,\n baseLogger,\n ))\n ) {\n return null;\n }\n\n logger(config, index, envName);\n yield* mergeChainOpts(chain, config);\n }\n return chain;\n };\n}\n\nfunction* mergeExtendsChain(\n chain: ConfigChain,\n opts: ValidatedOptions,\n dirname: string,\n context: ConfigContext,\n files: Set,\n baseLogger?: ConfigPrinter,\n): Handler {\n if (opts.extends === undefined) return true;\n\n const file = yield* loadConfig(\n opts.extends,\n dirname,\n context.envName,\n context.caller,\n );\n\n if (files.has(file)) {\n throw new Error(\n `Configuration cycle detected loading ${file.filepath}.\\n` +\n `File already loaded following the config chain:\\n` +\n Array.from(files, file => ` - ${file.filepath}`).join(\"\\n\"),\n );\n }\n\n files.add(file);\n const fileChain = yield* loadFileChain(\n validateExtendFile(file),\n context,\n files,\n baseLogger,\n );\n files.delete(file);\n\n if (!fileChain) return false;\n\n mergeChain(chain, fileChain);\n\n return true;\n}\n\nfunction mergeChain(target: ConfigChain, source: ConfigChain): ConfigChain {\n target.options.push(...source.options);\n target.plugins.push(...source.plugins);\n target.presets.push(...source.presets);\n for (const file of source.files) {\n target.files.add(file);\n }\n\n return target;\n}\n\nfunction* mergeChainOpts(\n target: ConfigChain,\n { options, plugins, presets }: OptionsAndDescriptors,\n): Handler {\n target.options.push(options);\n target.plugins.push(...(yield* plugins()));\n target.presets.push(...(yield* presets()));\n\n return target;\n}\n\nfunction emptyChain(): ConfigChain {\n return {\n options: [],\n presets: [],\n plugins: [],\n files: new Set(),\n };\n}\n\nfunction normalizeOptions(opts: ValidatedOptions): ValidatedOptions {\n const options = {\n ...opts,\n };\n delete options.extends;\n delete options.env;\n delete options.overrides;\n delete options.plugins;\n delete options.presets;\n delete options.passPerPreset;\n delete options.ignore;\n delete options.only;\n delete options.test;\n delete options.include;\n delete options.exclude;\n\n // \"sourceMap\" is just aliased to sourceMap, so copy it over as\n // we merge the options together.\n if (Object.prototype.hasOwnProperty.call(options, \"sourceMap\")) {\n options.sourceMaps = options.sourceMap;\n delete options.sourceMap;\n }\n return options;\n}\n\nfunction dedupDescriptors(\n items: Array,\n): Array {\n const map: Map<\n Function,\n Map\n > = new Map();\n\n const descriptors = [];\n\n for (const item of items) {\n if (typeof item.value === \"function\") {\n const fnKey = item.value;\n let nameMap = map.get(fnKey);\n if (!nameMap) {\n nameMap = new Map();\n map.set(fnKey, nameMap);\n }\n let desc = nameMap.get(item.name);\n if (!desc) {\n desc = { value: item };\n descriptors.push(desc);\n\n // Treat passPerPreset presets as unique, skipping them\n // in the merge processing steps.\n if (!item.ownPass) nameMap.set(item.name, desc);\n } else {\n desc.value = item;\n }\n } else {\n descriptors.push({ value: item });\n }\n }\n\n return descriptors.reduce((acc, desc) => {\n acc.push(desc.value);\n return acc;\n }, []);\n}\n\nfunction configIsApplicable(\n { options }: OptionsAndDescriptors,\n dirname: string,\n context: ConfigContext,\n configName: string,\n): boolean {\n return (\n (options.test === undefined ||\n configFieldIsApplicable(context, options.test, dirname, configName)) &&\n (options.include === undefined ||\n configFieldIsApplicable(context, options.include, dirname, configName)) &&\n (options.exclude === undefined ||\n !configFieldIsApplicable(context, options.exclude, dirname, configName))\n );\n}\n\nfunction configFieldIsApplicable(\n context: ConfigContext,\n test: ConfigApplicableTest,\n dirname: string,\n configName: string,\n): boolean {\n const patterns = Array.isArray(test) ? test : [test];\n\n return matchesPatterns(context, patterns, dirname, configName);\n}\n\n/**\n * Print the ignoreList-values in a more helpful way than the default.\n */\nfunction ignoreListReplacer(\n _key: string,\n value: IgnoreList | IgnoreItem,\n): IgnoreList | IgnoreItem | string {\n if (value instanceof RegExp) {\n return String(value);\n }\n\n return value;\n}\n\n/**\n * Tests if a filename should be ignored based on \"ignore\" and \"only\" options.\n */\nfunction shouldIgnore(\n context: ConfigContext,\n ignore: IgnoreList | undefined | null,\n only: IgnoreList | undefined | null,\n dirname: string,\n): boolean {\n if (ignore && matchesPatterns(context, ignore, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it matches one of \\`ignore: ${JSON.stringify(\n ignore,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n if (only && !matchesPatterns(context, only, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it fails to match one of \\`only: ${JSON.stringify(\n only,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns result of calling function with filename if pattern is a function.\n * Otherwise returns result of matching pattern Regex with filename.\n */\nfunction matchesPatterns(\n context: ConfigContext,\n patterns: IgnoreList,\n dirname: string,\n configName?: string,\n): boolean {\n return patterns.some(pattern =>\n matchPattern(pattern, dirname, context.filename, context, configName),\n );\n}\n\nfunction matchPattern(\n pattern: IgnoreItem,\n dirname: string,\n pathToTest: string | undefined,\n context: ConfigContext,\n configName?: string,\n): boolean {\n if (typeof pattern === \"function\") {\n return !!endHiddenCallStack(pattern)(pathToTest, {\n dirname,\n envName: context.envName,\n caller: context.caller,\n });\n }\n\n if (typeof pathToTest !== \"string\") {\n throw new ConfigError(\n `Configuration contains string/RegExp pattern, but no filename was passed to Babel`,\n configName,\n );\n }\n\n if (typeof pattern === \"string\") {\n pattern = pathPatternToRegex(pattern, dirname);\n }\n return pattern.test(pathToTest);\n}\n"],"mappings":";;;;;;;;AAEA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;E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,CAACgF,OAAO,EAAExI,OAAO,EAAE1C,OAAO,CAACkE,QAAQ,EAAElE,OAAO,EAAEqK,UAAU,CAAC,CACtE;AACH;AAEA,SAASnE,YAAYA,CACnBgF,OAAmB,EACnBxI,OAAe,EACfyI,UAA8B,EAC9BnL,OAAsB,EACtBqK,UAAmB,EACV;EACT,IAAI,OAAOa,OAAO,KAAK,UAAU,EAAE;IACjC,OAAO,CAAC,CAAC,IAAAE,qCAAkB,EAACF,OAAO,CAAC,CAACC,UAAU,EAAE;MAC/CzI,OAAO;MACPzB,OAAO,EAAEjB,OAAO,CAACiB,OAAO;MACxBgC,MAAM,EAAEjD,OAAO,CAACiD;IAClB,CAAC,CAAC;EACJ;EAEA,IAAI,OAAOkI,UAAU,KAAK,QAAQ,EAAE;IAClC,MAAM,IAAIE,oBAAW,CAClB,mFAAkF,EACnFhB,UAAU,CACX;EACH;EAEA,IAAI,OAAOa,OAAO,KAAK,QAAQ,EAAE;IAC/BA,OAAO,GAAG,IAAAlF,uBAAkB,EAACkF,OAAO,EAAExI,OAAO,CAAC;EAChD;EACA,OAAOwI,OAAO,CAACjC,IAAI,CAACkC,UAAU,CAAC;AACjC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js.map b/node_modules/@babel/core/lib/config/config-descriptors.js.map index e1decaad2..fbbe4264a 100644 --- a/node_modules/@babel/core/lib/config/config-descriptors.js.map +++ b/node_modules/@babel/core/lib/config/config-descriptors.js.map @@ -1 +1 @@ -{"version":3,"names":["isEqualDescriptor","a","b","name","value","options","dirname","alias","ownPass","file","request","resolved","handlerOf","optionsWithResolvedBrowserslistConfigFile","browserslistConfigFile","resolveBrowserslistConfigFile","createCachedDescriptors","plugins","presets","passPerPreset","createCachedPluginDescriptors","createCachedPresetDescriptors","createUncachedDescriptors","once","createPluginDescriptors","createPresetDescriptors","PRESET_DESCRIPTOR_CACHE","WeakMap","makeWeakCacheSync","items","cache","using","dir","makeStrongCacheSync","makeStrongCache","descriptors","map","desc","loadCachedDescriptor","PLUGIN_DESCRIPTOR_CACHE","DEFAULT_OPTIONS","cacheByOptions","get","set","possibilities","indexOf","matches","filter","possibility","length","push","createDescriptors","type","gensync","all","item","index","createDescriptor","assertNoDuplicates","pair","getItemDescriptor","Array","isArray","undefined","filepath","Error","resolver","loadPlugin","loadPreset","String","__esModule","default","Map","nameMap","Set","has","conflicts","i","JSON","stringify","join","add"],"sources":["../../src/config/config-descriptors.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional\";\n\nimport { loadPlugin, loadPreset } from \"./files\";\n\nimport { getItemDescriptor } from \"./item\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching\";\nimport type { CacheConfigurator } from \"./caching\";\n\nimport type {\n ValidatedOptions,\n PluginList,\n PluginItem,\n} from \"./validation/options\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: ValidatedOptions;\n plugins: () => Handler>;\n presets: () => Handler>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport type UnloadedDescriptor = {\n name: string | undefined;\n value: any | Function;\n options: {} | undefined | false;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n};\n\nfunction isEqualDescriptor(\n a: UnloadedDescriptor,\n b: UnloadedDescriptor,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n (a.file && a.file.request) === (b.file && b.file.request) &&\n (a.file && a.file.resolved) === (b.file && b.file.resolved)\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: ValidatedOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf(value: T): Handler {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: ValidatedOptions,\n dirname: string,\n): ValidatedOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]),\n };\n}\n\n/**\n * Create a set of descriptors from a given options object, with consistent\n * identity for the descriptors, but not caching based on any specific identity.\n */\nexport function createUncachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n // The returned result here is cached to represent a config object in\n // memory, so we build and memoize the descriptors to ensure the same\n // values are returned consistently.\n plugins: once(() =>\n createPluginDescriptors(options.plugins || [], dirname, alias),\n ),\n presets: once(() =>\n createPresetDescriptors(\n options.presets || [],\n dirname,\n alias,\n !!options.passPerPreset,\n ),\n ),\n };\n}\n\nconst PRESET_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPresetDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCacheSync((alias: string) =>\n makeStrongCache(function* (\n passPerPreset: boolean,\n ): Handler> {\n const descriptors = yield* createPresetDescriptors(\n items,\n dirname,\n alias,\n passPerPreset,\n );\n return descriptors.map(\n // Items are cached using the overall preset array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc),\n );\n }),\n );\n },\n);\n\nconst PLUGIN_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPluginDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCache(function* (\n alias: string,\n ): Handler> {\n const descriptors = yield* createPluginDescriptors(items, dirname, alias);\n return descriptors.map(\n // Items are cached using the overall plugin array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc),\n );\n });\n },\n);\n\n/**\n * When no options object is given in a descriptor, this object is used\n * as a WeakMap key in order to have consistent identity.\n */\nconst DEFAULT_OPTIONS = {};\n\n/**\n * Given the cache and a descriptor, returns a matching descriptor from the\n * cache, or else returns the input descriptor and adds it to the cache for\n * next time.\n */\nfunction loadCachedDescriptor(\n cache: WeakMap<{} | Function, WeakMap<{}, Array>>,\n desc: UnloadedDescriptor,\n) {\n const { value, options = DEFAULT_OPTIONS } = desc;\n if (options === false) return desc;\n\n let cacheByOptions = cache.get(value);\n if (!cacheByOptions) {\n cacheByOptions = new WeakMap();\n cache.set(value, cacheByOptions);\n }\n\n let possibilities = cacheByOptions.get(options);\n if (!possibilities) {\n possibilities = [];\n cacheByOptions.set(options, possibilities);\n }\n\n if (possibilities.indexOf(desc) === -1) {\n const matches = possibilities.filter(possibility =>\n isEqualDescriptor(possibility, desc),\n );\n if (matches.length > 0) {\n return matches[0];\n }\n\n possibilities.push(desc);\n }\n\n return desc;\n}\n\nfunction* createPresetDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n passPerPreset: boolean,\n): Handler> {\n return yield* createDescriptors(\n \"preset\",\n items,\n dirname,\n alias,\n passPerPreset,\n );\n}\n\nfunction* createPluginDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n): Handler> {\n return yield* createDescriptors(\"plugin\", items, dirname, alias);\n}\n\nfunction* createDescriptors(\n type: \"plugin\" | \"preset\",\n items: PluginList,\n dirname: string,\n alias: string,\n ownPass?: boolean,\n): Handler> {\n const descriptors = yield* gensync.all(\n items.map((item, index) =>\n createDescriptor(item, dirname, {\n type,\n alias: `${alias}$${index}`,\n ownPass: !!ownPass,\n }),\n ),\n );\n\n assertNoDuplicates(descriptors);\n\n return descriptors;\n}\n\n/**\n * Given a plugin/preset item, resolve it into a standard format.\n */\nexport function* createDescriptor(\n pair: PluginItem,\n dirname: string,\n {\n type,\n alias,\n ownPass,\n }: {\n type?: \"plugin\" | \"preset\";\n alias: string;\n ownPass?: boolean;\n },\n): Handler {\n const desc = getItemDescriptor(pair);\n if (desc) {\n return desc;\n }\n\n let name;\n let options;\n // todo(flow->ts) better type annotation\n let value: any = pair;\n if (Array.isArray(value)) {\n if (value.length === 3) {\n [value, options, name] = value;\n } else {\n [value, options] = value;\n }\n }\n\n let file = undefined;\n let filepath = null;\n if (typeof value === \"string\") {\n if (typeof type !== \"string\") {\n throw new Error(\n \"To resolve a string-based item, the type of item must be given\",\n );\n }\n const resolver = type === \"plugin\" ? loadPlugin : loadPreset;\n const request = value;\n\n ({ filepath, value } = yield* resolver(value, dirname));\n\n file = {\n request,\n resolved: filepath,\n };\n }\n\n if (!value) {\n throw new Error(`Unexpected falsy value: ${String(value)}`);\n }\n\n if (typeof value === \"object\" && value.__esModule) {\n if (value.default) {\n value = value.default;\n } else {\n throw new Error(\"Must export a default export when using ES6 modules.\");\n }\n }\n\n if (typeof value !== \"object\" && typeof value !== \"function\") {\n throw new Error(\n `Unsupported format: ${typeof value}. Expected an object or a function.`,\n );\n }\n\n if (filepath !== null && typeof value === \"object\" && value) {\n // We allow object values for plugins/presets nested directly within a\n // config object, because it can be useful to define them in nested\n // configuration contexts.\n throw new Error(\n `Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`,\n );\n }\n\n return {\n name,\n alias: filepath || alias,\n value,\n options,\n dirname,\n ownPass,\n file,\n };\n}\n\nfunction assertNoDuplicates(items: Array): void {\n const map = new Map();\n\n for (const item of items) {\n if (typeof item.value !== \"function\") continue;\n\n let nameMap = map.get(item.value);\n if (!nameMap) {\n nameMap = new Set();\n map.set(item.value, nameMap);\n }\n\n if (nameMap.has(item.name)) {\n const conflicts = items.filter(i => i.value === item.value);\n throw new Error(\n [\n `Duplicate plugin/preset detected.`,\n `If you'd like to use two separate instances of a plugin,`,\n `they need separate names, e.g.`,\n ``,\n ` plugins: [`,\n ` ['some-plugin', {}],`,\n ` ['some-plugin', {}, 'some unique name'],`,\n ` ]`,\n ``,\n `Duplicates detected are:`,\n `${JSON.stringify(conflicts, null, 2)}`,\n ].join(\"\\n\"),\n );\n }\n\n nameMap.add(item.name);\n }\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAEA;AAEA;AAEA;AAaA;AA2BA,SAASA,iBAAiB,CACxBC,CAAqB,EACrBC,CAAqB,EACZ;EACT,OACED,CAAC,CAACE,IAAI,KAAKD,CAAC,CAACC,IAAI,IACjBF,CAAC,CAACG,KAAK,KAAKF,CAAC,CAACE,KAAK,IACnBH,CAAC,CAACI,OAAO,KAAKH,CAAC,CAACG,OAAO,IACvBJ,CAAC,CAACK,OAAO,KAAKJ,CAAC,CAACI,OAAO,IACvBL,CAAC,CAACM,KAAK,KAAKL,CAAC,CAACK,KAAK,IACnBN,CAAC,CAACO,OAAO,KAAKN,CAAC,CAACM,OAAO,IACvB,CAACP,CAAC,CAACQ,IAAI,IAAIR,CAAC,CAACQ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AClE,MAAMO,GAAG,GAAG,IAAIoC,GAAG,EAAE;EAErB,KAAK,MAAMjB,IAAI,IAAI1B,KAAK,EAAE;IACxB,IAAI,OAAO0B,IAAI,CAACnD,KAAK,KAAK,UAAU,EAAE;IAEtC,IAAIqE,OAAO,GAAGrC,GAAG,CAACM,GAAG,CAACa,IAAI,CAACnD,KAAK,CAAC;IACjC,IAAI,CAACqE,OAAO,EAAE;MACZA,OAAO,GAAG,IAAIC,GAAG,EAAE;MACnBtC,GAAG,CAACO,GAAG,CAACY,IAAI,CAACnD,KAAK,EAAEqE,OAAO,CAAC;IAC9B;IAEA,IAAIA,OAAO,CAACE,GAAG,CAACpB,IAAI,CAACpD,IAAI,CAAC,EAAE;MAC1B,MAAMyE,SAAS,GAAG/C,KAAK,CAACkB,MAAM,CAAC8B,CAAC,IAAIA,CAAC,CAACzE,KAAK,KAAKmD,IAAI,CAACnD,KAAK,CAAC;MAC3D,MAAM,IAAI6D,KAAK,CACb,CACG,mCAAkC,EAClC,0DAAyD,EACzD,gCAA+B,EAC/B,EAAC,EACD,cAAa,EACb,0BAAyB,EACzB,8CAA6C,EAC7C,KAAI,EACJ,EAAC,EACD,0BAAyB,EACzB,GAAEa,IAAI,CAACC,SAAS,CAACH,SAAS,EAAE,IAAI,EAAE,CAAC,CAAE,EAAC,CACxC,CAACI,IAAI,CAAC,IAAI,CAAC,CACb;IACH;IAEAP,OAAO,CAACQ,GAAG,CAAC1B,IAAI,CAACpD,IAAI,CAAC;EACxB;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_functional","_files","_item","_caching","_resolveTargets","isEqualDescriptor","a","b","name","value","options","dirname","alias","ownPass","file","request","resolved","handlerOf","optionsWithResolvedBrowserslistConfigFile","browserslistConfigFile","resolveBrowserslistConfigFile","createCachedDescriptors","plugins","presets","passPerPreset","createCachedPluginDescriptors","createCachedPresetDescriptors","createUncachedDescriptors","once","createPluginDescriptors","createPresetDescriptors","PRESET_DESCRIPTOR_CACHE","WeakMap","makeWeakCacheSync","items","cache","using","dir","makeStrongCacheSync","makeStrongCache","descriptors","map","desc","loadCachedDescriptor","PLUGIN_DESCRIPTOR_CACHE","DEFAULT_OPTIONS","cacheByOptions","get","set","possibilities","indexOf","matches","filter","possibility","length","push","createDescriptors","type","gensync","all","item","index","createDescriptor","assertNoDuplicates","pair","getItemDescriptor","Array","isArray","undefined","filepath","Error","resolver","loadPlugin","loadPreset","String","__esModule","default","Map","nameMap","Set","has","conflicts","i","JSON","stringify","join","add"],"sources":["../../src/config/config-descriptors.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional\";\n\nimport { loadPlugin, loadPreset } from \"./files\";\n\nimport { getItemDescriptor } from \"./item\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching\";\nimport type { CacheConfigurator } from \"./caching\";\n\nimport type {\n ValidatedOptions,\n PluginList,\n PluginItem,\n} from \"./validation/options\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: ValidatedOptions;\n plugins: () => Handler>;\n presets: () => Handler>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport type UnloadedDescriptor = {\n name: string | undefined;\n value: any | Function;\n options: {} | undefined | false;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n};\n\nfunction isEqualDescriptor(\n a: UnloadedDescriptor,\n b: UnloadedDescriptor,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n (a.file && a.file.request) === (b.file && b.file.request) &&\n (a.file && a.file.resolved) === (b.file && b.file.resolved)\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: ValidatedOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf(value: T): Handler {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: ValidatedOptions,\n dirname: string,\n): ValidatedOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]),\n };\n}\n\n/**\n * Create a set of descriptors from a given options object, with consistent\n * identity for the descriptors, but not caching based on any specific identity.\n */\nexport function createUncachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n // The returned result here is cached to represent a config object in\n // memory, so we build and memoize the descriptors to ensure the same\n // values are returned consistently.\n plugins: once(() =>\n createPluginDescriptors(options.plugins || [], dirname, alias),\n ),\n presets: once(() =>\n createPresetDescriptors(\n options.presets || [],\n dirname,\n alias,\n !!options.passPerPreset,\n ),\n ),\n };\n}\n\nconst PRESET_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPresetDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCacheSync((alias: string) =>\n makeStrongCache(function* (\n passPerPreset: boolean,\n ): Handler> {\n const descriptors = yield* createPresetDescriptors(\n items,\n dirname,\n alias,\n passPerPreset,\n );\n return descriptors.map(\n // Items are cached using the overall preset array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc),\n );\n }),\n );\n },\n);\n\nconst PLUGIN_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPluginDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCache(function* (\n alias: string,\n ): Handler> {\n const descriptors = yield* createPluginDescriptors(items, dirname, alias);\n return descriptors.map(\n // Items are cached using the overall plugin array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc),\n );\n });\n },\n);\n\n/**\n * When no options object is given in a descriptor, this object is used\n * as a WeakMap key in order to have consistent identity.\n */\nconst DEFAULT_OPTIONS = {};\n\n/**\n * Given the cache and a descriptor, returns a matching descriptor from the\n * cache, or else returns the input descriptor and adds it to the cache for\n * next time.\n */\nfunction loadCachedDescriptor(\n cache: WeakMap<{} | Function, WeakMap<{}, Array>>,\n desc: UnloadedDescriptor,\n) {\n const { value, options = DEFAULT_OPTIONS } = desc;\n if (options === false) return desc;\n\n let cacheByOptions = cache.get(value);\n if (!cacheByOptions) {\n cacheByOptions = new WeakMap();\n cache.set(value, cacheByOptions);\n }\n\n let possibilities = cacheByOptions.get(options);\n if (!possibilities) {\n possibilities = [];\n cacheByOptions.set(options, possibilities);\n }\n\n if (possibilities.indexOf(desc) === -1) {\n const matches = possibilities.filter(possibility =>\n isEqualDescriptor(possibility, desc),\n );\n if (matches.length > 0) {\n return matches[0];\n }\n\n possibilities.push(desc);\n }\n\n return desc;\n}\n\nfunction* createPresetDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n passPerPreset: boolean,\n): Handler> {\n return yield* createDescriptors(\n \"preset\",\n items,\n dirname,\n alias,\n passPerPreset,\n );\n}\n\nfunction* createPluginDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n): Handler> {\n return yield* createDescriptors(\"plugin\", items, dirname, alias);\n}\n\nfunction* createDescriptors(\n type: \"plugin\" | \"preset\",\n items: PluginList,\n dirname: string,\n alias: string,\n ownPass?: boolean,\n): Handler> {\n const descriptors = yield* gensync.all(\n items.map((item, index) =>\n createDescriptor(item, dirname, {\n type,\n alias: `${alias}$${index}`,\n ownPass: !!ownPass,\n }),\n ),\n );\n\n assertNoDuplicates(descriptors);\n\n return descriptors;\n}\n\n/**\n * Given a plugin/preset item, resolve it into a standard format.\n */\nexport function* createDescriptor(\n pair: PluginItem,\n dirname: string,\n {\n type,\n alias,\n ownPass,\n }: {\n type?: \"plugin\" | \"preset\";\n alias: string;\n ownPass?: boolean;\n },\n): Handler {\n const desc = getItemDescriptor(pair);\n if (desc) {\n return desc;\n }\n\n let name;\n let options;\n // todo(flow->ts) better type annotation\n let value: any = pair;\n if (Array.isArray(value)) {\n if (value.length === 3) {\n [value, options, name] = value;\n } else {\n [value, options] = value;\n }\n }\n\n let file = undefined;\n let filepath = null;\n if (typeof value === \"string\") {\n if (typeof type !== \"string\") {\n throw new Error(\n \"To resolve a string-based item, the type of item must be given\",\n );\n }\n const resolver = type === \"plugin\" ? loadPlugin : loadPreset;\n const request = value;\n\n ({ filepath, value } = yield* resolver(value, dirname));\n\n file = {\n request,\n resolved: filepath,\n };\n }\n\n if (!value) {\n throw new Error(`Unexpected falsy value: ${String(value)}`);\n }\n\n if (typeof value === \"object\" && value.__esModule) {\n if (value.default) {\n value = value.default;\n } else {\n throw new Error(\"Must export a default export when using ES6 modules.\");\n }\n }\n\n if (typeof value !== \"object\" && typeof value !== \"function\") {\n throw new Error(\n `Unsupported format: ${typeof value}. Expected an object or a function.`,\n );\n }\n\n if (filepath !== null && typeof value === \"object\" && value) {\n // We allow object values for plugins/presets nested directly within a\n // config object, because it can be useful to define them in nested\n // configuration contexts.\n throw new Error(\n `Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`,\n );\n }\n\n return {\n name,\n alias: filepath || alias,\n value,\n options,\n dirname,\n ownPass,\n file,\n };\n}\n\nfunction assertNoDuplicates(items: Array): void {\n const map = new Map();\n\n for (const item of items) {\n if (typeof item.value !== \"function\") continue;\n\n let nameMap = map.get(item.value);\n if (!nameMap) {\n nameMap = new Set();\n map.set(item.value, nameMap);\n }\n\n if (nameMap.has(item.name)) {\n const conflicts = items.filter(i => i.value === item.value);\n throw new Error(\n [\n `Duplicate plugin/preset detected.`,\n `If you'd like to use two separate instances of a plugin,`,\n `they need separate names, e.g.`,\n ``,\n ` plugins: [`,\n ` ['some-plugin', {}],`,\n ` ['some-plugin', {}, 'some unique name'],`,\n ` ]`,\n ``,\n `Duplicates detected are:`,\n `${JSON.stringify(conflicts, null, 2)}`,\n ].join(\"\\n\"),\n );\n }\n\n nameMap.add(item.name);\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAaA,IAAAK,eAAA,GAAAL,OAAA;AA2BA,SAASM,iBAAiBA,CACxBC,CAAqB,EACrBC,CAAqB,EACZ;EACT,OACED,CAAC,CAACE,IAAI,KAAKD,CAAC,CAACC,IAAI,IACjBF,CAAC,CAACG,KAAK,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No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js index b9ba32915..414cef79c 100644 --- a/node_modules/@babel/core/lib/config/files/configuration.js +++ b/node_modules/@babel/core/lib/config/files/configuration.js @@ -51,21 +51,14 @@ var _moduleTypes = require("./module-types"); var _patternToRegex = require("../pattern-to-regex"); var _configError = require("../../errors/config-error"); var fs = require("../../gensync-utils/fs"); -function _module() { - const data = require("module"); - _module = function () { - return data; - }; - return data; -} var _rewriteStackTrace = require("../../errors/rewrite-stack-trace"); const debug = _debug()("babel:config:loading:files:configuration"); -const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json"]; +const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"]; exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; -const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json"]; +const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json", ".babelrc.cts"]; const BABELIGNORE_FILENAME = ".babelignore"; const LOADING_CONFIGS = new Set(); -const readConfigJS = (0, _caching.makeStrongCache)(function* readConfigJS(filepath, cache) { +const readConfigCode = (0, _caching.makeStrongCache)(function* readConfigCode(filepath, cache) { if (!_fs().existsSync(filepath)) { cache.never(); return null; @@ -225,10 +218,18 @@ function* loadConfig(name, dirname, envName, caller) { } function readConfig(filepath, envName, caller) { const ext = _path().extname(filepath); - return ext === ".js" || ext === ".cjs" || ext === ".mjs" ? readConfigJS(filepath, { - envName, - caller - }) : readConfigJSON5(filepath); + switch (ext) { + case ".js": + case ".cjs": + case ".mjs": + case ".cts": + return readConfigCode(filepath, { + envName, + caller + }); + default: + return readConfigJSON5(filepath); + } } function* resolveShowConfigPath(dirname) { const targetPath = process.env.BABEL_SHOW_CONFIG_FOR; diff --git a/node_modules/@babel/core/lib/config/files/configuration.js.map b/node_modules/@babel/core/lib/config/files/configuration.js.map index 7eabd13c0..e6a027ac1 100644 --- a/node_modules/@babel/core/lib/config/files/configuration.js.map +++ b/node_modules/@babel/core/lib/config/files/configuration.js.map @@ -1 +1 @@ -{"version":3,"names":["debug","buildDebug","ROOT_CONFIG_FILENAMES","RELATIVE_CONFIG_FILENAMES","BABELIGNORE_FILENAME","LOADING_CONFIGS","Set","readConfigJS","makeStrongCache","filepath","cache","nodeFs","existsSync","never","has","dirname","path","options","add","loadCjsOrMjsDefault","delete","assertCache","endHiddenCallStack","makeConfigAPI","Array","isArray","ConfigError","then","configured","throwConfigError","packageToBabelConfig","makeWeakCacheSync","file","babel","readConfigJSON5","makeStaticFileCache","content","json5","parse","err","message","readIgnoreConfig","ignoreDir","ignorePatterns","split","map","line","replace","trim","filter","pattern","ignore","pathPatternToRegex","findConfigUpwards","rootDir","filename","join","nextDir","findRelativeConfig","packageData","envName","caller","config","loc","directories","loadOneConfig","pkg","ignoreLoc","findRootConfig","names","previousConfig","configs","gensync","all","readConfig","reduce","basename","loadConfig","name","paths","conf","ext","extname","resolveShowConfigPath","targetPath","process","env","BABEL_SHOW_CONFIG_FOR","absolutePath","resolve","stats","fs","stat","isFile","Error"],"sources":["../../../src/config/files/configuration.ts"],"sourcesContent":["import buildDebug from \"debug\";\nimport nodeFs from \"fs\";\nimport path from \"path\";\nimport json5 from \"json5\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport { makeStrongCache, makeWeakCacheSync } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport { makeConfigAPI } from \"../helpers/config-api\";\nimport type { ConfigAPI } from \"../helpers/config-api\";\nimport { makeStaticFileCache } from \"./utils\";\nimport loadCjsOrMjsDefault from \"./module-types\";\nimport pathPatternToRegex from \"../pattern-to-regex\";\nimport type { FilePackageData, RelativeConfig, ConfigFile } from \"./types\";\nimport type { CallerMetadata } from \"../validation/options\";\nimport ConfigError from \"../../errors/config-error\";\n\nimport * as fs from \"../../gensync-utils/fs\";\n\nimport { createRequire } from \"module\";\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:configuration\");\n\nexport const ROOT_CONFIG_FILENAMES = [\n \"babel.config.js\",\n \"babel.config.cjs\",\n \"babel.config.mjs\",\n \"babel.config.json\",\n];\nconst RELATIVE_CONFIG_FILENAMES = [\n \".babelrc\",\n \".babelrc.js\",\n \".babelrc.cjs\",\n \".babelrc.mjs\",\n \".babelrc.json\",\n];\n\nconst BABELIGNORE_FILENAME = \".babelignore\";\n\nconst LOADING_CONFIGS = new Set();\n\nconst readConfigJS = makeStrongCache(function* readConfigJS(\n filepath: string,\n cache: CacheConfigurator<{\n envName: string;\n caller: CallerMetadata | undefined;\n }>,\n): Handler {\n if (!nodeFs.existsSync(filepath)) {\n cache.never();\n return null;\n }\n\n // The `require()` call below can make this code reentrant if a require hook like @babel/register has been\n // loaded into the system. That would cause Babel to attempt to compile the `.babelrc.js` file as it loads\n // below. To cover this case, we auto-ignore re-entrant config processing.\n if (LOADING_CONFIGS.has(filepath)) {\n cache.never();\n\n debug(\"Auto-ignoring usage of config %o.\", filepath);\n return {\n filepath,\n dirname: path.dirname(filepath),\n options: {},\n };\n }\n\n let options: unknown;\n try {\n LOADING_CONFIGS.add(filepath);\n options = yield* loadCjsOrMjsDefault(\n filepath,\n \"You appear to be using a native ECMAScript module configuration \" +\n \"file, which is only supported when running Babel asynchronously.\",\n );\n } finally {\n LOADING_CONFIGS.delete(filepath);\n }\n\n let assertCache = false;\n if (typeof options === \"function\") {\n // @ts-expect-error - if we want to make it possible to use async configs\n yield* [];\n\n options = endHiddenCallStack(options as any as (api: ConfigAPI) => {})(\n makeConfigAPI(cache),\n );\n\n assertCache = true;\n }\n\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new ConfigError(\n `Configuration should be an exported JavaScript object.`,\n filepath,\n );\n }\n\n // @ts-expect-error todo(flow->ts)\n if (typeof options.then === \"function\") {\n throw new ConfigError(\n `You appear to be using an async configuration, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously return your config.`,\n filepath,\n );\n }\n\n if (assertCache && !cache.configured()) throwConfigError(filepath);\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst packageToBabelConfig = makeWeakCacheSync(\n (file: ConfigFile): ConfigFile | null => {\n const babel: unknown = file.options[\"babel\"];\n\n if (typeof babel === \"undefined\") return null;\n\n if (typeof babel !== \"object\" || Array.isArray(babel) || babel === null) {\n throw new ConfigError(`.babel property must be an object`, file.filepath);\n }\n\n return {\n filepath: file.filepath,\n dirname: file.dirname,\n options: babel,\n };\n },\n);\n\nconst readConfigJSON5 = makeStaticFileCache((filepath, content): ConfigFile => {\n let options;\n try {\n options = json5.parse(content);\n } catch (err) {\n throw new ConfigError(\n `Error while parsing config - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new ConfigError(`No config detected`, filepath);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(`Config returned typeof ${typeof options}`, filepath);\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n delete options[\"$schema\"];\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst readIgnoreConfig = makeStaticFileCache((filepath, content) => {\n const ignoreDir = path.dirname(filepath);\n const ignorePatterns = content\n .split(\"\\n\")\n .map(line => line.replace(/#(.*?)$/, \"\").trim())\n .filter(line => !!line);\n\n for (const pattern of ignorePatterns) {\n if (pattern[0] === \"!\") {\n throw new ConfigError(\n `Negation of file paths is not supported.`,\n filepath,\n );\n }\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n ignore: ignorePatterns.map(pattern =>\n pathPatternToRegex(pattern, ignoreDir),\n ),\n };\n});\n\nexport function findConfigUpwards(rootDir: string): string | null {\n let dirname = rootDir;\n for (;;) {\n for (const filename of ROOT_CONFIG_FILENAMES) {\n if (nodeFs.existsSync(path.join(dirname, filename))) {\n return dirname;\n }\n }\n\n const nextDir = path.dirname(dirname);\n if (dirname === nextDir) break;\n dirname = nextDir;\n }\n\n return null;\n}\n\nexport function* findRelativeConfig(\n packageData: FilePackageData,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n let config = null;\n let ignore = null;\n\n const dirname = path.dirname(packageData.filepath);\n\n for (const loc of packageData.directories) {\n if (!config) {\n config = yield* loadOneConfig(\n RELATIVE_CONFIG_FILENAMES,\n loc,\n envName,\n caller,\n packageData.pkg?.dirname === loc\n ? packageToBabelConfig(packageData.pkg)\n : null,\n );\n }\n\n if (!ignore) {\n const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME);\n ignore = yield* readIgnoreConfig(ignoreLoc);\n\n if (ignore) {\n debug(\"Found ignore %o from %o.\", ignore.filepath, dirname);\n }\n }\n }\n\n return { config, ignore };\n}\n\nexport function findRootConfig(\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);\n}\n\nfunction* loadOneConfig(\n names: string[],\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n previousConfig: ConfigFile | null = null,\n): Handler {\n const configs = yield* gensync.all(\n names.map(filename =>\n readConfig(path.join(dirname, filename), envName, caller),\n ),\n );\n const config = configs.reduce((previousConfig: ConfigFile | null, config) => {\n if (config && previousConfig) {\n throw new ConfigError(\n `Multiple configuration files found. Please remove one:\\n` +\n ` - ${path.basename(previousConfig.filepath)}\\n` +\n ` - ${config.filepath}\\n` +\n `from ${dirname}`,\n );\n }\n\n return config || previousConfig;\n }, previousConfig);\n\n if (config) {\n debug(\"Found configuration %o from %o.\", config.filepath, dirname);\n }\n return config;\n}\n\nexport function* loadConfig(\n name: string,\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const filepath = require.resolve(name, { paths: [dirname] });\n\n const conf = yield* readConfig(filepath, envName, caller);\n if (!conf) {\n throw new ConfigError(\n `Config file contains no configuration data`,\n filepath,\n );\n }\n\n debug(\"Loaded config %o from %o.\", name, dirname);\n return conf;\n}\n\n/**\n * Read the given config file, returning the result. Returns null if no config was found, but will\n * throw if there are parsing errors while loading a config.\n */\nfunction readConfig(\n filepath: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const ext = path.extname(filepath);\n return ext === \".js\" || ext === \".cjs\" || ext === \".mjs\"\n ? readConfigJS(filepath, { envName, caller })\n : readConfigJSON5(filepath);\n}\n\nexport function* resolveShowConfigPath(\n dirname: string,\n): Handler {\n const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;\n if (targetPath != null) {\n const absolutePath = path.resolve(dirname, targetPath);\n const stats = yield* fs.stat(absolutePath);\n if (!stats.isFile()) {\n throw new Error(\n `${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`,\n );\n }\n return absolutePath;\n }\n return null;\n}\n\nfunction throwConfigError(filepath: string): never {\n throw new ConfigError(\n `\\\nCaching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n // The API exposes the following:\n\n // Cache the returned value forever and don't call this function again.\n api.cache(true);\n\n // Don't cache at all. Not recommended because it will be very slow.\n api.cache(false);\n\n // Cached based on the value of some function. If this function returns a value different from\n // a previously-encountered value, the plugins will re-evaluate.\n var env = api.cache(() => process.env.NODE_ENV);\n\n // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n // any possible NODE_ENV value that might come up during plugin execution.\n var isProd = api.cache(() => process.env.NODE_ENV === \"production\");\n\n // .cache(fn) will perform a linear search though instances to find the matching plugin based\n // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n // previous instance whenever something changes, you may use:\n var isProd = api.cache.invalidate(() => process.env.NODE_ENV === \"production\");\n\n // Note, we also expose the following more-verbose versions of the above examples:\n api.cache.forever(); // api.cache(true)\n api.cache.never(); // api.cache(false)\n api.cache.using(fn); // api.cache(fn)\n\n // Return the value that will be cached.\n return { };\n};`,\n filepath,\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAEA;AAEA;AACA;AACA;AAGA;AAEA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAGA,MAAMA,KAAK,GAAGC,QAAU,CAAC,0CAA0C,CAAC;AAE7D,MAAMC,qBAAqB,GAAG,CACnC,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,CACpB;AAAC;AACF,MAAMC,yBAAyB,GAAG,CAChC,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,CAChB;AAED,MAAMC,oBAAoB,GAAG,cAAc;AAE3C,MAAMC,eAAe,GAAG,IAAIC,GAAG,EAAE;AAEjC,MAAMC,YAAY,GAAG,IAAAC,wBAAe,EAAC,UAAUD,YAAY,CACzDE,QAAgB,EAChBC,KAGE,EAC0B;EAC5B,IAAI,CAACC,KAAM,CAACC,UAAU,CAACH,QAAQ,CAAC,EAAE;IAChCC,KAAK,CAACG,KAAK,EAAE;IACb,OAAO,IAAI;EACb;EAKA,IAAIR,eAAe,CAACS,GAAG,CAACL,QAAQ,CAAC,EAAE;IACjCC,KAAK,CAACG,KAAK,EAAE;IAEbb,KAAK,CAAC,mCAAmC,EAAES,QAAQ,CAAC;IACpD,OAAO;MACLA,QAAQ;MACRM,OAAO,EAAEC,OAAI,CAACD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G,KAAK,KAAK,IAAIA,GAAG,KAAK,MAAM,IAAIA,GAAG,KAAK,MAAM,GACpD1E,YAAY,CAACE,QAAQ,EAAE;IAAEmD,OAAO;IAAEC;EAAO,CAAC,CAAC,GAC3C3B,eAAe,CAACzB,QAAQ,CAAC;AAC/B;AAEO,UAAU0E,qBAAqB,CACpCpE,OAAe,EACS;EACxB,MAAMqE,UAAU,GAAGC,OAAO,CAACC,GAAG,CAACC,qBAAqB;EACpD,IAAIH,UAAU,IAAI,IAAI,EAAE;IACtB,MAAMI,YAAY,GAAGxE,OAAI,CAACyE,OAAO,CAAC1E,OAAO,EAAEqE,UAAU,CAAC;IACtD,MAAMM,KAAK,GAAG,OAAOC,EAAE,CAACC,IAAI,CAACJ,YAAY,CAAC;IAC1C,IAAI,CAACE,KAAK,CAACG,MAAM,EAAE,EAAE;MACnB,MAAM,IAAIC,KAAK,CACZ,GAAEN,YAAa,sFAAqF,CACtG;IACH;IACA,OAAOA,YAAY;EACrB;EACA,OAAO,IAAI;AACb;AAEA,SAAS3D,gBAAgB,CAACpB,QAAgB,EAAS;EACjD,MAAM,IAAIiB,oBAAW,CAClB;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACCjB,QAAQ,CACT;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["_debug","data","require","_fs","_path","_json","_gensync","_caching","_configApi","_utils","_moduleTypes","_patternToRegex","_configError","fs","_rewriteStackTrace","debug","buildDebug","ROOT_CONFIG_FILENAMES","exports","RELATIVE_CONFIG_FILENAMES","BABELIGNORE_FILENAME","LOADING_CONFIGS","Set","readConfigCode","makeStrongCache","filepath","cache","nodeFs","existsSync","never","has","dirname","path","options","add","loadCodeDefault","delete","assertCache","endHiddenCallStack","makeConfigAPI","Array","isArray","ConfigError","then","configured","throwConfigError","packageToBabelConfig","makeWeakCacheSync","file","babel","readConfigJSON5","makeStaticFileCache","content","json5","parse","err","message","readIgnoreConfig","ignoreDir","ignorePatterns","split","map","line","replace","trim","filter","pattern","ignore","pathPatternToRegex","findConfigUpwards","rootDir","filename","join","nextDir","findRelativeConfig","packageData","envName","caller","config","loc","directories","_packageData$pkg","loadOneConfig","pkg","ignoreLoc","findRootConfig","names","previousConfig","configs","gensync","all","readConfig","reduce","basename","loadConfig","name","v","w","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","code","conf","ext","extname","resolveShowConfigPath","targetPath","env","BABEL_SHOW_CONFIG_FOR","absolutePath","stats","stat","isFile"],"sources":["../../../src/config/files/configuration.ts"],"sourcesContent":["import buildDebug from \"debug\";\nimport nodeFs from \"fs\";\nimport path from \"path\";\nimport json5 from \"json5\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport { makeStrongCache, makeWeakCacheSync } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport { makeConfigAPI } from \"../helpers/config-api\";\nimport type { ConfigAPI } from \"../helpers/config-api\";\nimport { makeStaticFileCache } from \"./utils\";\nimport loadCodeDefault from \"./module-types\";\nimport pathPatternToRegex from \"../pattern-to-regex\";\nimport type { FilePackageData, RelativeConfig, ConfigFile } from \"./types\";\nimport type { CallerMetadata } from \"../validation/options\";\nimport ConfigError from \"../../errors/config-error\";\n\nimport * as fs from \"../../gensync-utils/fs\";\n\nimport { createRequire } from \"module\";\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:configuration\");\n\nexport const ROOT_CONFIG_FILENAMES = [\n \"babel.config.js\",\n \"babel.config.cjs\",\n \"babel.config.mjs\",\n \"babel.config.json\",\n \"babel.config.cts\",\n];\nconst RELATIVE_CONFIG_FILENAMES = [\n \".babelrc\",\n \".babelrc.js\",\n \".babelrc.cjs\",\n \".babelrc.mjs\",\n \".babelrc.json\",\n \".babelrc.cts\",\n];\n\nconst BABELIGNORE_FILENAME = \".babelignore\";\n\nconst LOADING_CONFIGS = new Set();\n\nconst readConfigCode = makeStrongCache(function* readConfigCode(\n filepath: string,\n cache: CacheConfigurator<{\n envName: string;\n caller: CallerMetadata | undefined;\n }>,\n): Handler {\n if (!nodeFs.existsSync(filepath)) {\n cache.never();\n return null;\n }\n\n // The `require()` call below can make this code reentrant if a require hook like @babel/register has been\n // loaded into the system. That would cause Babel to attempt to compile the `.babelrc.js` file as it loads\n // below. To cover this case, we auto-ignore re-entrant config processing.\n if (LOADING_CONFIGS.has(filepath)) {\n cache.never();\n\n debug(\"Auto-ignoring usage of config %o.\", filepath);\n return {\n filepath,\n dirname: path.dirname(filepath),\n options: {},\n };\n }\n\n let options: unknown;\n try {\n LOADING_CONFIGS.add(filepath);\n options = yield* loadCodeDefault(\n filepath,\n \"You appear to be using a native ECMAScript module configuration \" +\n \"file, which is only supported when running Babel asynchronously.\",\n );\n } finally {\n LOADING_CONFIGS.delete(filepath);\n }\n\n let assertCache = false;\n if (typeof options === \"function\") {\n // @ts-expect-error - if we want to make it possible to use async configs\n yield* [];\n\n options = endHiddenCallStack(options as any as (api: ConfigAPI) => {})(\n makeConfigAPI(cache),\n );\n\n assertCache = true;\n }\n\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new ConfigError(\n `Configuration should be an exported JavaScript object.`,\n filepath,\n );\n }\n\n // @ts-expect-error todo(flow->ts)\n if (typeof options.then === \"function\") {\n throw new ConfigError(\n `You appear to be using an async configuration, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously return your config.`,\n filepath,\n );\n }\n\n if (assertCache && !cache.configured()) throwConfigError(filepath);\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst packageToBabelConfig = makeWeakCacheSync(\n (file: ConfigFile): ConfigFile | null => {\n const babel: unknown = file.options[\"babel\"];\n\n if (typeof babel === \"undefined\") return null;\n\n if (typeof babel !== \"object\" || Array.isArray(babel) || babel === null) {\n throw new ConfigError(`.babel property must be an object`, file.filepath);\n }\n\n return {\n filepath: file.filepath,\n dirname: file.dirname,\n options: babel,\n };\n },\n);\n\nconst readConfigJSON5 = makeStaticFileCache((filepath, content): ConfigFile => {\n let options;\n try {\n options = json5.parse(content);\n } catch (err) {\n throw new ConfigError(\n `Error while parsing config - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new ConfigError(`No config detected`, filepath);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(`Config returned typeof ${typeof options}`, filepath);\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n delete options[\"$schema\"];\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst readIgnoreConfig = makeStaticFileCache((filepath, content) => {\n const ignoreDir = path.dirname(filepath);\n const ignorePatterns = content\n .split(\"\\n\")\n .map(line => line.replace(/#(.*?)$/, \"\").trim())\n .filter(line => !!line);\n\n for (const pattern of ignorePatterns) {\n if (pattern[0] === \"!\") {\n throw new ConfigError(\n `Negation of file paths is not supported.`,\n filepath,\n );\n }\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n ignore: ignorePatterns.map(pattern =>\n pathPatternToRegex(pattern, ignoreDir),\n ),\n };\n});\n\nexport function findConfigUpwards(rootDir: string): string | null {\n let dirname = rootDir;\n for (;;) {\n for (const filename of ROOT_CONFIG_FILENAMES) {\n if (nodeFs.existsSync(path.join(dirname, filename))) {\n return dirname;\n }\n }\n\n const nextDir = path.dirname(dirname);\n if (dirname === nextDir) break;\n dirname = nextDir;\n }\n\n return null;\n}\n\nexport function* findRelativeConfig(\n packageData: FilePackageData,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n let config = null;\n let ignore = null;\n\n const dirname = path.dirname(packageData.filepath);\n\n for (const loc of packageData.directories) {\n if (!config) {\n config = yield* loadOneConfig(\n RELATIVE_CONFIG_FILENAMES,\n loc,\n envName,\n caller,\n packageData.pkg?.dirname === loc\n ? packageToBabelConfig(packageData.pkg)\n : null,\n );\n }\n\n if (!ignore) {\n const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME);\n ignore = yield* readIgnoreConfig(ignoreLoc);\n\n if (ignore) {\n debug(\"Found ignore %o from %o.\", ignore.filepath, dirname);\n }\n }\n }\n\n return { config, ignore };\n}\n\nexport function findRootConfig(\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);\n}\n\nfunction* loadOneConfig(\n names: string[],\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n previousConfig: ConfigFile | null = null,\n): Handler {\n const configs = yield* gensync.all(\n names.map(filename =>\n readConfig(path.join(dirname, filename), envName, caller),\n ),\n );\n const config = configs.reduce((previousConfig: ConfigFile | null, config) => {\n if (config && previousConfig) {\n throw new ConfigError(\n `Multiple configuration files found. Please remove one:\\n` +\n ` - ${path.basename(previousConfig.filepath)}\\n` +\n ` - ${config.filepath}\\n` +\n `from ${dirname}`,\n );\n }\n\n return config || previousConfig;\n }, previousConfig);\n\n if (config) {\n debug(\"Found configuration %o from %o.\", config.filepath, dirname);\n }\n return config;\n}\n\nexport function* loadConfig(\n name: string,\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const filepath = require.resolve(name, { paths: [dirname] });\n\n const conf = yield* readConfig(filepath, envName, caller);\n if (!conf) {\n throw new ConfigError(\n `Config file contains no configuration data`,\n filepath,\n );\n }\n\n debug(\"Loaded config %o from %o.\", name, dirname);\n return conf;\n}\n\n/**\n * Read the given config file, returning the result. Returns null if no config was found, but will\n * throw if there are parsing errors while loading a config.\n */\nfunction readConfig(\n filepath: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const ext = path.extname(filepath);\n switch (ext) {\n case \".js\":\n case \".cjs\":\n case \".mjs\":\n case \".cts\":\n return readConfigCode(filepath, { envName, caller });\n default:\n return readConfigJSON5(filepath);\n }\n}\n\nexport function* resolveShowConfigPath(\n dirname: string,\n): Handler {\n const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;\n if (targetPath != null) {\n const absolutePath = path.resolve(dirname, targetPath);\n const stats = yield* fs.stat(absolutePath);\n if (!stats.isFile()) {\n throw new Error(\n `${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`,\n );\n }\n return absolutePath;\n }\n return null;\n}\n\nfunction throwConfigError(filepath: string): never {\n throw new ConfigError(\n `\\\nCaching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n // The API exposes the following:\n\n // Cache the returned value forever and don't call this function again.\n api.cache(true);\n\n // Don't cache at all. Not recommended because it will be very slow.\n api.cache(false);\n\n // Cached based on the value of some function. If this function returns a value different from\n // a previously-encountered value, the plugins will re-evaluate.\n var env = api.cache(() => process.env.NODE_ENV);\n\n // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n // any possible NODE_ENV value that might come up during plugin execution.\n var isProd = api.cache(() => process.env.NODE_ENV === \"production\");\n\n // .cache(fn) will perform a linear search though instances to find the matching plugin based\n // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n // previous instance whenever something changes, you may use:\n var isProd = api.cache.invalidate(() => process.env.NODE_ENV === \"production\");\n\n // Note, we also expose the following more-verbose versions of the above examples:\n api.cache.forever(); // api.cache(true)\n api.cache.never(); // api.cache(false)\n api.cache.using(fn); // api.cache(fn)\n\n // Return the value that will be cached.\n return { };\n};`,\n filepath,\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA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IAAI,IAAI,EAAE;IACtB,MAAMG,YAAY,GAAGvF,OAAI,CAACqE,OAAO,CAACtE,OAAO,EAAEqF,UAAU,CAAC;IACtD,MAAMI,KAAK,GAAG,OAAO3G,EAAE,CAAC4G,IAAI,CAACF,YAAY,CAAC;IAC1C,IAAI,CAACC,KAAK,CAACE,MAAM,EAAE,EAAE;MACnB,MAAM,IAAIZ,KAAK,CACZ,GAAES,YAAa,sFAAqF,CACtG;IACH;IACA,OAAOA,YAAY;EACrB;EACA,OAAO,IAAI;AACb;AAEA,SAAS1E,gBAAgBA,CAACpB,QAAgB,EAAS;EACjD,MAAM,IAAIiB,oBAAW,CAClB;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACCjB,QAAQ,CACT;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js index 2a6660210..84b9a27a9 100644 --- a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js +++ b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js @@ -4,13 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = resolve; -function _module() { - const data = require("module"); - _module = function () { - return data; - }; - return data; -} var _importMetaResolve = require("../../vendor/import-meta-resolve"); function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } diff --git a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map index af41ca1a3..feb82e145 100644 --- a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map +++ b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map @@ -1 +1 @@ -{"version":3,"names":["import_","require","importMetaResolveP","process","execArgv","includes","then","m","default","polyfill","Promise","resolve","specifier","parent"],"sources":["../../../src/config/files/import-meta-resolve.ts"],"sourcesContent":["import { createRequire } from \"module\";\nimport { resolve as polyfill } from \"../../vendor/import-meta-resolve\";\n\nconst require = createRequire(import.meta.url);\n\nlet import_;\ntry {\n // Node < 13.3 doesn't support import() syntax.\n import_ = require(\"./import.cjs\");\n} catch {}\n\n// import.meta.resolve is only available in ESM, but this file is compiled to CJS.\n// We can extract it using dynamic import.\nconst importMetaResolveP: Promise =\n import_ &&\n // Due to a Node.js/V8 bug (https://github.com/nodejs/node/issues/35889), we cannot\n // use always dynamic import because it segfaults when running in a Node.js `vm` context,\n // which is used by the default Jest environment and by webpack-cli.\n //\n // However, import.meta.resolve is experimental and only enabled when Node.js is run\n // with the `--experimental-import-meta-resolve` flag: we can avoid calling import()\n // when that flag is not enabled, so that the default behavior never segfaults.\n //\n // Hopefully, before Node.js unflags import.meta.resolve, either:\n // - we will move to ESM, so that we have direct access to import.meta.resolve, or\n // - the V8 bug will be fixed so that we can safely use dynamic import by default.\n //\n // I (@nicolo-ribaudo) am really anoyed by this bug, because there is no known\n // work-around other than \"don't use dynamic import if you are running in a `vm` context\",\n // but there is no reliable way to detect it (you cannot try/catch segfaults).\n //\n // This is the only place where we *need* to use dynamic import because we need to access\n // an ES module. All the other places will first try using require() and *then*, if\n // it throws because it's a module, will fallback to import().\n process.execArgv.includes(\"--experimental-import-meta-resolve\")\n ? import_(\"data:text/javascript,export default import.meta.resolve\").then(\n (m: { default: ImportMeta[\"resolve\"] | undefined }) =>\n m.default || polyfill,\n () => polyfill,\n )\n : Promise.resolve(polyfill);\n\nexport default async function resolve(\n specifier: Parameters[0],\n parent?: Parameters[1],\n): ReturnType {\n return (await importMetaResolveP)(specifier, parent);\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAAuE;AAAA;AAIvE,IAAIA,OAAO;AACX,IAAI;EAEFA,OAAO,GAAGC,OAAO,CAAC,cAAc,CAAC;AACnC,CAAC,CAAC,gBAAM,CAAC;AAIT,MAAMC,kBAAkD,GACtDF,OAAO,IAoBPG,OAAO,CAACC,QAAQ,CAACC,QAAQ,CAAC,oCAAoC,CAAC,GAC3DL,OAAO,CAAC,yDAAyD,CAAC,CAACM,IAAI,CACpEC,CAAiD,IAChDA,CAAC,CAACC,OAAO,IAAIC,0BAAQ,EACvB,MAAMA,0BAAQ,CACf,GACDC,OAAO,CAACC,OAAO,CAACF,0BAAQ,CAAC;AAAC,SAEFE,OAAO;EAAA;AAAA;AAAA;EAAA,6BAAtB,WACbC,SAA+C,EAC/CC,MAA6C,EACV;IACnC,OAAO,OAAOX,kBAAkB,EAAEU,SAAS,EAAEC,MAAM,CAAC;EACtD,CAAC;EAAA;AAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_importMetaResolve","require","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","import_","_unused","importMetaResolveP","process","execArgv","includes","m","default","polyfill","_x","_x2","_resolve","specifier","parent"],"sources":["../../../src/config/files/import-meta-resolve.ts"],"sourcesContent":["import { createRequire } from \"module\";\nimport { resolve as polyfill } from \"../../vendor/import-meta-resolve\";\n\nconst require = createRequire(import.meta.url);\n\nlet import_;\ntry {\n // Node < 13.3 doesn't support import() syntax.\n import_ = require(\"./import.cjs\");\n} catch {}\n\n// import.meta.resolve is only available in ESM, but this file is compiled to CJS.\n// We can extract it using dynamic import.\nconst importMetaResolveP: Promise =\n import_ &&\n // Due to a Node.js/V8 bug (https://github.com/nodejs/node/issues/35889), we cannot\n // use always dynamic import because it segfaults when running in a Node.js `vm` context,\n // which is used by the default Jest environment and by webpack-cli.\n //\n // However, import.meta.resolve is experimental and only enabled when Node.js is run\n // with the `--experimental-import-meta-resolve` flag: we can avoid calling import()\n // when that flag is not enabled, so that the default behavior never segfaults.\n //\n // Hopefully, before Node.js unflags import.meta.resolve, either:\n // - we will move to ESM, so that we have direct access to import.meta.resolve, or\n // - the V8 bug will be fixed so that we can safely use dynamic import by default.\n //\n // I (@nicolo-ribaudo) am really annoyed by this bug, because there is no known\n // work-around other than \"don't use dynamic import if you are running in a `vm` context\",\n // but there is no reliable way to detect it (you cannot try/catch segfaults).\n //\n // This is the only place where we *need* to use dynamic import because we need to access\n // an ES module. All the other places will first try using require() and *then*, if\n // it throws because it's a module, will fallback to import().\n process.execArgv.includes(\"--experimental-import-meta-resolve\")\n ? import_(\"data:text/javascript,export default import.meta.resolve\").then(\n (m: { default: ImportMeta[\"resolve\"] | undefined }) =>\n m.default || polyfill,\n () => polyfill,\n )\n : Promise.resolve(polyfill);\n\nexport default async function resolve(\n specifier: Parameters[0],\n parent?: Parameters[1],\n): ReturnType {\n return (await importMetaResolveP)(specifier, parent);\n}\n"],"mappings":";;;;;;AACA,IAAAA,kBAAA,GAAAC,OAAA;AAAuE,SAAAC,mBAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,GAAA,EAAAC,GAAA,cAAAC,IAAA,GAAAP,GAAA,CAAAK,GAAA,EAAAC,GAAA,OAAAE,KAAA,GAAAD,IAAA,CAAAC,KAAA,WAAAC,KAAA,IAAAP,MAAA,CAAAO,KAAA,iBAAAF,IAAA,CAAAG,IAAA,IAAAT,OAAA,CAAAO,KAAA,YAAAG,OAAA,CAAAV,OAAA,CAAAO,KAAA,EAAAI,IAAA,CAAAT,KAAA,EAAAC,MAAA;AAAA,SAAAS,kBAAAC,EAAA,6BAAAC,IAAA,SAAAC,IAAA,GAAAC,SAAA,aAAAN,OAAA,WAAAV,OAAA,EAAAC,MAAA,QAAAF,GAAA,GAAAc,EAAA,CAAAI,KAAA,CAAAH,IAAA,EAAAC,IAAA,YAAAb,MAAAK,KAAA,IAAAT,kBAAA,CAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,UAAAI,KAAA,cAAAJ,OAAAe,GAAA,IAAApB,kBAAA,CAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,WAAAe,GAAA,KAAAhB,KAAA,CAAAiB,SAAA;AAIvE,IAAIC,OAAO;AACX,IAAI;EAEFA,OAAO,GAAGvB,OAAO,CAAC,cAAc,CAAC;AACnC,CAAC,CAAC,OAAAwB,OAAA,EAAM,CAAC;AAIT,MAAMC,kBAAkD,GACtDF,OAAO,IAoBPG,OAAO,CAACC,QAAQ,CAACC,QAAQ,CAAC,oCAAoC,CAAC,GAC3DL,OAAO,CAAC,yDAAyD,CAAC,CAACT,IAAI,CACpEe,CAAiD,IAChDA,CAAC,CAACC,OAAO,IAAIC,0BAAQ,EACvB,MAAMA,0BAAQ,CACf,GACDlB,OAAO,CAACV,OAAO,CAAC4B,0BAAQ,CAAC;AAAC,SAEF5B,OAAOA,CAAA6B,EAAA,EAAAC,GAAA;EAAA,OAAAC,QAAA,CAAAd,KAAA,OAAAD,SAAA;AAAA;AAAA,SAAAe,SAAA;EAAAA,QAAA,GAAAnB,iBAAA,CAAtB,WACboB,SAA+C,EAC/CC,MAA6C,EACV;IACnC,OAAO,OAAOX,kBAAkB,EAAEU,SAAS,EAAEC,MAAM,CAAC;EACtD,CAAC;EAAA,OAAAF,QAAA,CAAAd,KAAA,OAAAD,SAAA;AAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/import.cjs.map b/node_modules/@babel/core/lib/config/files/import.cjs.map index 3b9bdeff6..90ec96816 100644 --- a/node_modules/@babel/core/lib/config/files/import.cjs.map +++ b/node_modules/@babel/core/lib/config/files/import.cjs.map @@ -1 +1 @@ -{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":"AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAO,CAACC,QAAQ,EAAE;EAC1C,OAAO,MAAM,CAACA,QAAQ,CAAC;AACzB,CAAC;AAAC"} \ No newline at end of file +{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":"AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAOA,CAACC,QAAQ,EAAE;EAC1C,OAAO,MAAM,CAACA,QAAQ,CAAC;AACzB,CAAC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js.map b/node_modules/@babel/core/lib/config/files/index-browser.js.map index e8f803d01..62e4eca84 100644 --- a/node_modules/@babel/core/lib/config/files/index-browser.js.map +++ b/node_modules/@babel/core/lib/config/files/index-browser.js.map @@ -1 +1 @@ -{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\n\nimport type { CallerMetadata } from \"../validation/options\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiB,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAe,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkB,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAc,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAU,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAE,eAAcD,IAAK,gBAAeF,OAAQ,eAAc,CAAC;AAC5E;AAGO,UAAUI,qBAAqB,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAG,EAAE;AAAC;AAG3C,SAASC,aAAa,CAACJ,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAGO,SAASO,aAAa,CAACL,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAEO,SAASQ,UAAU,CACxBN,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eAAc,CACjE;AACH;AAEO,SAASS,UAAU,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eAAc,CACjE;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\n\nimport type { CallerMetadata } from \"../validation/options\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAE,eAAcD,IAAK,gBAAeF,OAAQ,eAAc,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAG,EAAE;AAACC,OAAA,CAAAD,qBAAA,GAAAA,qBAAA;AAG3C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eAAc,CACjE;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eAAc,CACjE;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index.js.map b/node_modules/@babel/core/lib/config/files/index.js.map index 1add0a6d3..a53fa5b6f 100644 --- a/node_modules/@babel/core/lib/config/files/index.js.map +++ b/node_modules/@babel/core/lib/config/files/index.js.map @@ -1 +1 @@ -{"version":3,"names":["resolvePlugin","gensync","plugins","sync","resolvePreset"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({} as any as indexBrowserType as indexType);\n\nexport { findPackageData } from \"./package\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\nexport { loadPlugin, loadPreset } from \"./plugins\";\n\nimport gensync from \"gensync\";\nimport * as plugins from \"./plugins\";\n\nexport const resolvePlugin = gensync(plugins.resolvePlugin).sync;\nexport const resolvePreset = gensync(plugins.resolvePreset).sync;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;AAEA;AAcA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AApBA,CAAC,CAAC,CAAC;AAuBI,MAAMA,aAAa,GAAGC,UAAO,CAACC,OAAO,CAACF,aAAa,CAAC,CAACG,IAAI;AAAC;AAC1D,MAAMC,aAAa,GAAGH,UAAO,CAACC,OAAO,CAACE,aAAa,CAAC,CAACD,IAAI;AAAC;AAAA"} \ No newline at end of file +{"version":3,"names":["_package","require","_configuration","plugins","_gensync","data","resolvePlugin","gensync","sync","exports","resolvePreset"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({} as any as indexBrowserType as indexType);\n\nexport { findPackageData } from \"./package\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\nexport { loadPlugin, loadPreset } from \"./plugins\";\n\nimport gensync from \"gensync\";\nimport * as plugins from \"./plugins\";\n\nexport const resolvePlugin = gensync(plugins.resolvePlugin).sync;\nexport const resolvePreset = gensync(plugins.resolvePreset).sync;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAcA,IAAAE,OAAA,GAAAF,OAAA;AAEA,SAAAG,SAAA;EAAA,MAAAC,IAAA,GAAAJ,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AApBA,CAAC,CAAC,CAAC;AAuBI,MAAMC,aAAa,GAAGC,UAAO,CAACJ,OAAO,CAACG,aAAa,CAAC,CAACE,IAAI;AAACC,OAAA,CAAAH,aAAA,GAAAA,aAAA;AAC1D,MAAMI,aAAa,GAAGH,UAAO,CAACJ,OAAO,CAACO,aAAa,CAAC,CAACF,IAAI;AAACC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/module-types.js b/node_modules/@babel/core/lib/config/files/module-types.js index 950a9c3be..7e7dfdcf5 100644 --- a/node_modules/@babel/core/lib/config/files/module-types.js +++ b/node_modules/@babel/core/lib/config/files/module-types.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = loadCjsOrMjsDefault; +exports.default = loadCodeDefault; exports.supportsESM = void 0; var _async = require("../../gensync-utils/async"); function _path() { @@ -20,13 +20,6 @@ function _url() { }; return data; } -function _module() { - const data = require("module"); - _module = function () { - return data; - }; - return data; -} function _semver() { const data = require("semver"); _semver = function () { @@ -36,6 +29,7 @@ function _semver() { } var _rewriteStackTrace = require("../../errors/rewrite-stack-trace"); var _configError = require("../../errors/config-error"); +var _transformFile = require("../../transform-file"); function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } let import_; @@ -44,31 +38,62 @@ try { } catch (_unused) {} const supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2"); exports.supportsESM = supportsESM; -function* loadCjsOrMjsDefault(filepath, asyncError, fallbackToTranspiledModule = false) { - switch (guessJSModuleType(filepath)) { - case "cjs": +function* loadCodeDefault(filepath, asyncError, fallbackToTranspiledModule = false) { + switch (_path().extname(filepath)) { + case ".cjs": return loadCjsDefault(filepath, fallbackToTranspiledModule); - case "unknown": + case ".mjs": + break; + case ".cts": + return loadCtsDefault(filepath); + default: try { return loadCjsDefault(filepath, fallbackToTranspiledModule); } catch (e) { if (e.code !== "ERR_REQUIRE_ESM") throw e; } - case "mjs": - if (yield* (0, _async.isAsync)()) { - return yield* (0, _async.waitFor)(loadMjsDefault(filepath)); - } - throw new _configError.default(asyncError, filepath); } + if (yield* (0, _async.isAsync)()) { + return yield* (0, _async.waitFor)(loadMjsDefault(filepath)); + } + throw new _configError.default(asyncError, filepath); } -function guessJSModuleType(filename) { - switch (_path().extname(filename)) { - case ".cjs": - return "cjs"; - case ".mjs": - return "mjs"; - default: - return "unknown"; +function loadCtsDefault(filepath) { + const ext = ".cts"; + const hasTsSupport = !!(require.extensions[".ts"] || require.extensions[".cts"] || require.extensions[".mts"]); + let handler; + if (!hasTsSupport) { + const opts = { + babelrc: false, + configFile: false, + sourceType: "script", + sourceMaps: "inline", + presets: [[getTSPreset(filepath), Object.assign({ + disallowAmbiguousJSXLike: true, + allExtensions: true, + onlyRemoveTypeImports: true, + optimizeConstEnums: true + }, { + allowDeclareFields: true + })]] + }; + handler = function (m, filename) { + if (handler && filename.endsWith(ext)) { + return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, { + filename + })).code, filename); + } + return require.extensions[".js"](m, filename); + }; + require.extensions[ext] = handler; + } + try { + return (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath); + } finally { + if (!hasTsSupport) { + if (require.extensions[ext] === handler) delete require.extensions[ext]; + handler = undefined; + } } } function loadCjsDefault(filepath, fallbackToTranspiledModule) { @@ -81,13 +106,32 @@ function loadMjsDefault(_x) { function _loadMjsDefault() { _loadMjsDefault = _asyncToGenerator(function* (filepath) { if (!import_) { - throw new _configError.default("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n", filepath); + throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath); } const module = yield (0, _rewriteStackTrace.endHiddenCallStack)(import_)((0, _url().pathToFileURL)(filepath)); return module.default; }); return _loadMjsDefault.apply(this, arguments); } +function getTSPreset(filepath) { + try { + return require("@babel/preset-typescript"); + } catch (error) { + if (error.code !== "MODULE_NOT_FOUND") throw error; + let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!"; + if (process.versions.pnp) { + message += ` +If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file: + +packageExtensions: +\t"@babel/core@*": +\t\tpeerDependencies: +\t\t\t"@babel/preset-typescript": "*" +`; + } + throw new _configError.default(message, filepath); + } +} 0 && 0; //# sourceMappingURL=module-types.js.map diff --git a/node_modules/@babel/core/lib/config/files/module-types.js.map b/node_modules/@babel/core/lib/config/files/module-types.js.map index f7fad516e..2eecd9d37 100644 --- a/node_modules/@babel/core/lib/config/files/module-types.js.map +++ b/node_modules/@babel/core/lib/config/files/module-types.js.map @@ -1 +1 @@ -{"version":3,"names":["import_","require","supportsESM","semver","satisfies","process","versions","node","loadCjsOrMjsDefault","filepath","asyncError","fallbackToTranspiledModule","guessJSModuleType","loadCjsDefault","e","code","isAsync","waitFor","loadMjsDefault","ConfigError","filename","path","extname","module","endHiddenCallStack","__esModule","default","undefined","pathToFileURL"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async\";\nimport type { Handler } from \"gensync\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { createRequire } from \"module\";\nimport semver from \"semver\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace\";\nimport ConfigError from \"../../errors/config-error\";\n\nconst require = createRequire(import.meta.url);\n\nlet import_: ((specifier: string | URL) => any) | undefined;\ntry {\n // Old Node.js versions don't support import() syntax.\n import_ = require(\"./import.cjs\");\n} catch {}\n\nexport const supportsESM = semver.satisfies(\n process.versions.node,\n // older versions, starting from 10, support the dynamic\n // import syntax but always return a rejected promise.\n \"^12.17 || >=13.2\",\n);\n\nexport default function* loadCjsOrMjsDefault(\n filepath: string,\n asyncError: string,\n // TODO(Babel 8): Remove this\n fallbackToTranspiledModule: boolean = false,\n): Handler {\n switch (guessJSModuleType(filepath)) {\n case \"cjs\":\n return loadCjsDefault(filepath, fallbackToTranspiledModule);\n case \"unknown\":\n try {\n return loadCjsDefault(filepath, fallbackToTranspiledModule);\n } catch (e) {\n if (e.code !== \"ERR_REQUIRE_ESM\") throw e;\n }\n // fall through\n case \"mjs\":\n if (yield* isAsync()) {\n return yield* waitFor(loadMjsDefault(filepath));\n }\n throw new ConfigError(asyncError, filepath);\n }\n}\n\nfunction guessJSModuleType(filename: string): \"cjs\" | \"mjs\" | \"unknown\" {\n switch (path.extname(filename)) {\n case \".cjs\":\n return \"cjs\";\n case \".mjs\":\n return \"mjs\";\n default:\n return \"unknown\";\n }\n}\n\nfunction loadCjsDefault(filepath: string, fallbackToTranspiledModule: boolean) {\n const module = endHiddenCallStack(require)(filepath);\n return module?.__esModule\n ? // TODO (Babel 8): Remove \"module\" and \"undefined\" fallback\n module.default || (fallbackToTranspiledModule ? module : undefined)\n : module;\n}\n\nasync function loadMjsDefault(filepath: string) {\n if (!import_) {\n throw new ConfigError(\n \"Internal error: Native ECMAScript modules aren't supported\" +\n \" by this platform.\\n\",\n filepath,\n );\n }\n\n // import() expects URLs, not file paths.\n // https://github.com/nodejs/node/issues/31710\n const module = await endHiddenCallStack(import_)(pathToFileURL(filepath));\n return module.default;\n}\n"],"mappings":";;;;;;;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAA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AAC;EACpD,OAAOc,MAAM,YAANA,MAAM,CAAEE,UAAU,GAErBF,MAAM,CAACG,OAAO,KAAKf,0BAA0B,GAAGY,MAAM,GAAGI,SAAS,CAAC,GACnEJ,MAAM;AACZ;AAAC,SAEcL,cAAc;EAAA;AAAA;AAAA;EAAA,oCAA7B,WAA8BT,QAAgB,EAAE;IAC9C,IAAI,CAACT,OAAO,EAAE;MACZ,MAAM,IAAImB,oBAAW,CACnB,4DAA4D,GAC1D,sBAAsB,EACxBV,QAAQ,CACT;IACH;IAIA,MAAMc,MAAM,SAAS,IAAAC,qCAAkB,EAACxB,OAAO,CAAC,CAAC,IAAA4B,oBAAa,EAACnB,QAAQ,CAAC,CAAC;IACzE,OAAOc,MAAM,CAACG,OAAO;EACvB,CAAC;EAAA;AAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_async","require","_path","data","_url","_semver","_rewriteStackTrace","_configError","_transformFile","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","import_","_unused","supportsESM","semver","satisfies","process","versions","node","exports","loadCodeDefault","filepath","asyncError","fallbackToTranspiledModule","path","extname","loadCjsDefault","loadCtsDefault","e","code","isAsync","waitFor","loadMjsDefault","ConfigError","ext","hasTsSupport","extensions","handler","opts","babelrc","configFile","sourceType","sourceMaps","presets","getTSPreset","Object","assign","disallowAmbiguousJSXLike","allExtensions","onlyRemoveTypeImports","optimizeConstEnums","allowDeclareFields","m","filename","endsWith","_compile","transformFileSync","endHiddenCallStack","module","__esModule","default","_x","_loadMjsDefault","pathToFileURL","message","pnp"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async\";\nimport type { Handler } from \"gensync\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { createRequire } from \"module\";\nimport semver from \"semver\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace\";\nimport ConfigError from \"../../errors/config-error\";\n\nimport type { InputOptions } from \"..\";\nimport { transformFileSync } from \"../../transform-file\";\n\nconst require = createRequire(import.meta.url);\n\nlet import_: ((specifier: string | URL) => any) | undefined;\ntry {\n // Old Node.js versions don't support import() syntax.\n import_ = require(\"./import.cjs\");\n} catch {}\n\nexport const supportsESM = semver.satisfies(\n process.versions.node,\n // older versions, starting from 10, support the dynamic\n // import syntax but always return a rejected promise.\n \"^12.17 || >=13.2\",\n);\n\nexport default function* loadCodeDefault(\n filepath: string,\n asyncError: string,\n // TODO(Babel 8): Remove this\n fallbackToTranspiledModule: boolean = false,\n): Handler {\n switch (path.extname(filepath)) {\n case \".cjs\":\n return loadCjsDefault(filepath, fallbackToTranspiledModule);\n case \".mjs\":\n break;\n case \".cts\":\n return loadCtsDefault(filepath);\n default:\n try {\n return loadCjsDefault(filepath, fallbackToTranspiledModule);\n } catch (e) {\n if (e.code !== \"ERR_REQUIRE_ESM\") throw e;\n }\n }\n if (yield* isAsync()) {\n return yield* waitFor(loadMjsDefault(filepath));\n }\n throw new ConfigError(asyncError, filepath);\n}\n\nfunction loadCtsDefault(filepath: string) {\n const ext = \".cts\";\n const hasTsSupport = !!(\n require.extensions[\".ts\"] ||\n require.extensions[\".cts\"] ||\n require.extensions[\".mts\"]\n );\n\n let handler: NodeJS.RequireExtensions[\"\"];\n\n if (!hasTsSupport) {\n const opts: InputOptions = {\n babelrc: false,\n configFile: false,\n sourceType: \"script\",\n sourceMaps: \"inline\",\n presets: [\n [\n getTSPreset(filepath),\n {\n disallowAmbiguousJSXLike: true,\n allExtensions: true,\n onlyRemoveTypeImports: true,\n optimizeConstEnums: true,\n ...(!process.env.BABEL_8_BREAKING && {\n allowDeclareFields: true,\n }),\n },\n ],\n ],\n };\n\n handler = function (m, filename) {\n // If we want to support `.ts`, `.d.ts` must be handled specially.\n if (handler && filename.endsWith(ext)) {\n // @ts-expect-error Undocumented API\n return m._compile(\n transformFileSync(filename, {\n ...opts,\n filename,\n }).code,\n filename,\n );\n }\n return require.extensions[\".js\"](m, filename);\n };\n require.extensions[ext] = handler;\n }\n try {\n return endHiddenCallStack(require)(filepath);\n } finally {\n if (!hasTsSupport) {\n if (require.extensions[ext] === handler) delete require.extensions[ext];\n handler = undefined;\n }\n }\n}\n\nfunction loadCjsDefault(filepath: string, fallbackToTranspiledModule: boolean) {\n const module = endHiddenCallStack(require)(filepath);\n return module?.__esModule\n ? // TODO (Babel 8): Remove \"module\" and \"undefined\" fallback\n module.default || (fallbackToTranspiledModule ? module : undefined)\n : module;\n}\n\nasync function loadMjsDefault(filepath: string) {\n if (!import_) {\n throw new ConfigError(\n \"Internal error: Native ECMAScript modules aren't supported by this platform.\\n\",\n filepath,\n );\n }\n\n // import() expects URLs, not file paths.\n // https://github.com/nodejs/node/issues/31710\n const module = await endHiddenCallStack(import_)(pathToFileURL(filepath));\n return module.default;\n}\n\nfunction getTSPreset(filepath: string) {\n try {\n // eslint-disable-next-line import/no-extraneous-dependencies\n return require(\"@babel/preset-typescript\");\n } catch (error) {\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n let message =\n \"You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!\";\n\n if (process.versions.pnp) {\n // Using Yarn PnP, which doesn't allow requiring packages that are not\n // explicitly specified as dependencies.\n // TODO(Babel 8): Explicitly add `@babel/preset-typescript` as an\n // optional peer dependency of `@babel/core`.\n message += `\nIf you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:\n\npackageExtensions:\n\\t\"@babel/core@*\":\n\\t\\tpeerDependencies:\n\\t\\t\\t\"@babel/preset-typescript\": \"*\"\n`;\n }\n\n throw new ConfigError(message, filepath);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAAAC,MAAA;EAAA,MAAAC,IAAA,GAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;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AU,GAErBD,MAAM,CAACE,OAAO,KAAKrC,0BAA0B,GAAGmC,MAAM,GAAGhD,SAAS,CAAC,GACnEgD,MAAM;AACZ;AAAC,SAEc1B,cAAcA,CAAA6B,EAAA;EAAA,OAAAC,eAAA,CAAAtD,KAAA,OAAAD,SAAA;AAAA;AAAA,SAAAuD,gBAAA;EAAAA,eAAA,GAAA3D,iBAAA,CAA7B,WAA8BkB,QAAgB,EAAE;IAC9C,IAAI,CAACV,OAAO,EAAE;MACZ,MAAM,IAAIsB,oBAAW,CACnB,gFAAgF,EAChFZ,QAAQ,CACT;IACH;IAIA,MAAMqC,MAAM,SAAS,IAAAD,qCAAkB,EAAC9C,OAAO,CAAC,CAAC,IAAAoD,oBAAa,EAAC1C,QAAQ,CAAC,CAAC;IACzE,OAAOqC,MAAM,CAACE,OAAO;EACvB,CAAC;EAAA,OAAAE,eAAA,CAAAtD,KAAA,OAAAD,SAAA;AAAA;AAED,SAASqC,WAAWA,CAACvB,QAAgB,EAAE;EACrC,IAAI;IAEF,OAAOxC,OAAO,CAAC,0BAA0B,CAAC;EAC5C,CAAC,CAAC,OAAOkB,KAAK,EAAE;IACd,IAAIA,KAAK,CAAC8B,IAAI,KAAK,kBAAkB,EAAE,MAAM9B,KAAK;IAElD,IAAIiE,OAAO,GACT,yIAAyI;IAE3I,IAAIhD,OAAO,CAACC,QAAQ,CAACgD,GAAG,EAAE;MAKxBD,OAAO,IAAK;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;IACG;IAEA,MAAM,IAAI/B,oBAAW,CAAC+B,OAAO,EAAE3C,QAAQ,CAAC;EAC1C;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/package.js.map b/node_modules/@babel/core/lib/config/files/package.js.map index 829014ec5..770151ecb 100644 --- a/node_modules/@babel/core/lib/config/files/package.js.map +++ b/node_modules/@babel/core/lib/config/files/package.js.map @@ -1 +1 @@ -{"version":3,"names":["PACKAGE_FILENAME","readConfigPackage","makeStaticFileCache","filepath","content","options","JSON","parse","err","ConfigError","message","Error","Array","isArray","dirname","path","findPackageData","pkg","directories","isPackage","basename","push","join","nextLoc"],"sources":["../../../src/config/files/package.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { makeStaticFileCache } from \"./utils\";\n\nimport type { ConfigFile, FilePackageData } from \"./types\";\n\nimport ConfigError from \"../../errors/config-error\";\n\nconst PACKAGE_FILENAME = \"package.json\";\n\nconst readConfigPackage = makeStaticFileCache(\n (filepath, content): ConfigFile => {\n let options;\n try {\n options = JSON.parse(content) as unknown;\n } catch (err) {\n throw new ConfigError(\n `Error while parsing JSON - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new Error(`${filepath}: No config detected`);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(\n `Config returned typeof ${typeof options}`,\n filepath,\n );\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n },\n);\n\n/**\n * Find metadata about the package that this file is inside of. Resolution\n * of Babel's config requires general package information to decide when to\n * search for .babelrc files\n */\nexport function* findPackageData(filepath: string): Handler {\n let pkg = null;\n const directories = [];\n let isPackage = true;\n\n let dirname = path.dirname(filepath);\n while (!pkg && path.basename(dirname) !== \"node_modules\") {\n directories.push(dirname);\n\n pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME));\n\n const nextLoc = path.dirname(dirname);\n if (dirname === nextLoc) {\n isPackage = false;\n break;\n }\n dirname = nextLoc;\n }\n\n return { filepath, directories, pkg, isPackage };\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAIA;AAEA,MAAMA,gBAAgB,GAAG,cAAc;AAEvC,MAAMC,iBAAiB,GAAG,IAAAC,0BAAmB,EAC3C,CAACC,QAAQ,EAAEC,OAAO,KAAiB;EACjC,IAAIC,OAAO;EACX,IAAI;IACFA,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ACnB;EAEA,OAAO;IAAEpB,QAAQ;IAAEe,WAAW;IAAED,GAAG;IAAEE;EAAU,CAAC;AAClD;AAAC"} \ No newline at end of file +{"version":3,"names":["_path","data","require","_utils","_configError","PACKAGE_FILENAME","readConfigPackage","makeStaticFileCache","filepath","content","options","JSON","parse","err","ConfigError","message","Error","Array","isArray","dirname","path","findPackageData","pkg","directories","isPackage","basename","push","join","nextLoc"],"sources":["../../../src/config/files/package.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { makeStaticFileCache } from \"./utils\";\n\nimport type { ConfigFile, FilePackageData } from \"./types\";\n\nimport ConfigError from \"../../errors/config-error\";\n\nconst PACKAGE_FILENAME = \"package.json\";\n\nconst readConfigPackage = makeStaticFileCache(\n (filepath, content): ConfigFile => {\n let options;\n try {\n options = JSON.parse(content) as unknown;\n } catch (err) {\n throw new ConfigError(\n `Error while parsing JSON - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new Error(`${filepath}: No config detected`);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(\n `Config returned typeof ${typeof options}`,\n filepath,\n );\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n },\n);\n\n/**\n * Find metadata about the package that this file is inside of. Resolution\n * of Babel's config requires general package information to decide when to\n * search for .babelrc files\n */\nexport function* findPackageData(filepath: string): Handler {\n let pkg = null;\n const directories = [];\n let isPackage = true;\n\n let dirname = path.dirname(filepath);\n while (!pkg && path.basename(dirname) !== \"node_modules\") {\n directories.push(dirname);\n\n pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME));\n\n const nextLoc = path.dirname(dirname);\n if (dirname === nextLoc) {\n isPackage = false;\n break;\n }\n dirname = nextLoc;\n }\n\n return { filepath, directories, pkg, isPackage };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA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,CAACG,IAAI,CAACP,OAAO,CAAC;IAEzBG,GAAG,GAAG,OAAOhB,iBAAiB,CAACc,OAAI,CAACO,IAAI,CAACR,OAAO,EAAEd,gBAAgB,CAAC,CAAC;IAEpE,MAAMuB,OAAO,GAAGR,OAAI,CAACD,OAAO,CAACA,OAAO,CAAC;IACrC,IAAIA,OAAO,KAAKS,OAAO,EAAE;MACvBJ,SAAS,GAAG,KAAK;MACjB;IACF;IACAL,OAAO,GAAGS,OAAO;EACnB;EAEA,OAAO;IAAEpB,QAAQ;IAAEe,WAAW;IAAED,GAAG;IAAEE;EAAU,CAAC;AAClD;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/plugins.js b/node_modules/@babel/core/lib/config/files/plugins.js index e4156a348..ac4a8fdba 100644 --- a/node_modules/@babel/core/lib/config/files/plugins.js +++ b/node_modules/@babel/core/lib/config/files/plugins.js @@ -38,13 +38,6 @@ function _url() { return data; } var _importMetaResolve = require("./import-meta-resolve"); -function _module() { - const data = require("module"); - _module = function () { - return data; - }; - return data; -} function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } const debug = _debug()("babel:config:loading:files:plugins"); diff --git a/node_modules/@babel/core/lib/config/files/plugins.js.map b/node_modules/@babel/core/lib/config/files/plugins.js.map index 71d2d75c4..7681db3ea 100644 --- a/node_modules/@babel/core/lib/config/files/plugins.js.map +++ b/node_modules/@babel/core/lib/config/files/plugins.js.map @@ -1 +1 @@ -{"version":3,"names":["debug","buildDebug","EXACT_RE","BABEL_PLUGIN_PREFIX_RE","BABEL_PRESET_PREFIX_RE","BABEL_PLUGIN_ORG_RE","BABEL_PRESET_ORG_RE","OTHER_PLUGIN_ORG_RE","OTHER_PRESET_ORG_RE","OTHER_ORG_DEFAULT_RE","resolvePlugin","name","dirname","resolveStandardizedName","resolvePreset","loadPlugin","filepath","value","requireModule","loadPreset","standardizeName","type","path","isAbsolute","isPreset","replace","resolveAlternativesHelper","standardizedName","error","code","message","oppositeType","tryRequireResolve","id","paths","tryImportMetaResolve","options","importMetaResolve","resolveStandardizedNameForRequire","it","res","next","done","resolveStandardizedNameForImport","parentUrl","pathToFileURL","join","href","fileURLToPath","gensync","sync","process","cwd","async","supportsESM","e","e2","LOADING_MODULES","Set","isAsync","has","Error","add","loadCjsOrMjsDefault","err","delete"],"sources":["../../../src/config/files/plugins.ts"],"sourcesContent":["/**\n * This file handles all logic for converting string-based configuration references into loaded objects.\n */\n\nimport buildDebug from \"debug\";\nimport path from \"path\";\nimport gensync, { type Handler } from \"gensync\";\nimport { isAsync } from \"../../gensync-utils/async\";\nimport loadCjsOrMjsDefault, { supportsESM } from \"./module-types\";\nimport { fileURLToPath, pathToFileURL } from \"url\";\n\nimport importMetaResolve from \"./import-meta-resolve\";\n\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:plugins\");\n\nconst EXACT_RE = /^module:/;\nconst BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-plugin-)/;\nconst BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-preset-)/;\nconst BABEL_PLUGIN_ORG_RE = /^(@babel\\/)(?!plugin-|[^/]+\\/)/;\nconst BABEL_PRESET_ORG_RE = /^(@babel\\/)(?!preset-|[^/]+\\/)/;\nconst OTHER_PLUGIN_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-plugin(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_PRESET_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-preset(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;\n\nexport function* resolvePlugin(name: string, dirname: string): Handler {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return yield* resolveStandardizedName(\"plugin\", name, dirname);\n}\n\nexport function* resolvePreset(name: string, dirname: string): Handler {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return yield* resolveStandardizedName(\"preset\", name, dirname);\n}\n\nexport function* loadPlugin(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const filepath = yield* resolvePlugin(name, dirname);\n\n const value = yield* requireModule(\"plugin\", filepath);\n debug(\"Loaded plugin %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nexport function* loadPreset(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const filepath = yield* resolvePreset(name, dirname);\n\n const value = yield* requireModule(\"preset\", filepath);\n\n debug(\"Loaded preset %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nfunction standardizeName(type: \"plugin\" | \"preset\", name: string) {\n // Let absolute and relative paths through.\n if (path.isAbsolute(name)) return name;\n\n const isPreset = type === \"preset\";\n\n return (\n name\n // foo -> babel-preset-foo\n .replace(\n isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE,\n `babel-${type}-`,\n )\n // @babel/es2015 -> @babel/preset-es2015\n .replace(\n isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE,\n `$1${type}-`,\n )\n // @foo/mypreset -> @foo/babel-preset-mypreset\n .replace(\n isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE,\n `$1babel-${type}-`,\n )\n // @foo -> @foo/babel-preset\n .replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)\n // module:mypreset -> mypreset\n .replace(EXACT_RE, \"\")\n );\n}\n\ntype Result = { error: Error; value: null } | { error: null; value: T };\n\nfunction* resolveAlternativesHelper(\n type: \"plugin\" | \"preset\",\n name: string,\n): Iterator> {\n const standardizedName = standardizeName(type, name);\n const { error, value } = yield standardizedName;\n if (!error) return value;\n\n // @ts-expect-error code may not index error\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n if (standardizedName !== name && !(yield name).error) {\n error.message += `\\n- If you want to resolve \"${name}\", use \"module:${name}\"`;\n }\n\n if (!(yield standardizeName(type, \"@babel/\" + name)).error) {\n error.message += `\\n- Did you mean \"@babel/${name}\"?`;\n }\n\n const oppositeType = type === \"preset\" ? \"plugin\" : \"preset\";\n if (!(yield standardizeName(oppositeType, name)).error) {\n error.message += `\\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;\n }\n\n throw error;\n}\n\nfunction tryRequireResolve(\n id: Parameters[0],\n { paths: [dirname] }: Parameters[1],\n): Result {\n try {\n return { error: null, value: require.resolve(id, { paths: [dirname] }) };\n } catch (error) {\n return { error, value: null };\n }\n}\n\nasync function tryImportMetaResolve(\n id: Parameters[0],\n options: Parameters[1],\n): Promise> {\n try {\n return { error: null, value: await importMetaResolve(id, options) };\n } catch (error) {\n return { error, value: null };\n }\n}\n\nfunction resolveStandardizedNameForRequire(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(tryRequireResolve(res.value, { paths: [dirname] }));\n }\n return res.value;\n}\nasync function resolveStandardizedNameForImport(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const parentUrl = pathToFileURL(\n path.join(dirname, \"./babel-virtual-resolve-base.js\"),\n ).href;\n\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(await tryImportMetaResolve(res.value, parentUrl));\n }\n return fileURLToPath(res.value);\n}\n\nconst resolveStandardizedName = gensync<\n [type: \"plugin\" | \"preset\", name: string, dirname?: string],\n string\n>({\n sync(type, name, dirname = process.cwd()) {\n return resolveStandardizedNameForRequire(type, name, dirname);\n },\n async async(type, name, dirname = process.cwd()) {\n if (!supportsESM) {\n return resolveStandardizedNameForRequire(type, name, dirname);\n }\n\n try {\n return await resolveStandardizedNameForImport(type, name, dirname);\n } catch (e) {\n try {\n return resolveStandardizedNameForRequire(type, name, dirname);\n } catch (e2) {\n if (e.type === \"MODULE_NOT_FOUND\") throw e;\n if (e2.type === \"MODULE_NOT_FOUND\") throw e2;\n throw e;\n }\n }\n },\n});\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var LOADING_MODULES = new Set();\n}\nfunction* requireModule(type: string, name: string): Handler {\n if (!process.env.BABEL_8_BREAKING) {\n if (!(yield* isAsync()) && LOADING_MODULES.has(name)) {\n throw new Error(\n `Reentrant ${type} detected trying to load \"${name}\". This module is not ignored ` +\n \"and is trying to load itself while compiling itself, leading to a dependency cycle. \" +\n 'We recommend adding it to your \"ignore\" list in your babelrc, or to a .babelignore.',\n );\n }\n }\n\n try {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.add(name);\n }\n return yield* loadCjsOrMjsDefault(\n name,\n `You appear to be using a native ECMAScript module ${type}, ` +\n \"which is only supported when running Babel asynchronously.\",\n // For backward compatibility, we need to support malformed presets\n // defined as separate named exports rather than a single default\n // export.\n // See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js\n true,\n );\n } catch (err) {\n err.message = `[BABEL]: ${err.message} (While processing: ${name})`;\n throw err;\n } finally {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.delete(name);\n }\n }\n}\n"],"mappings":";;;;;;;;;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AACA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAEA;EAAA;EAAA;I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AAEC,OAAO,CAAC;MACpE,CAAC,CAAC,OAAO2C,CAAC,EAAE;QACV,IAAI;UACF,OAAOjB,iCAAiC,CAACjB,IAAI,EAAEV,IAAI,EAAEC,OAAO,CAAC;QAC/D,CAAC,CAAC,OAAO4C,EAAE,EAAE;UACX,IAAID,CAAC,CAAClC,IAAI,KAAK,kBAAkB,EAAE,MAAMkC,CAAC;UAC1C,IAAIC,EAAE,CAACnC,IAAI,KAAK,kBAAkB,EAAE,MAAMmC,EAAE;UAC5C,MAAMD,CAAC;QACT;MACF;IAAC;EACH;AACF,CAAC,CAAC;AAEiC;EAEjC,IAAIE,eAAe,GAAG,IAAIC,GAAG,EAAE;AACjC;AACA,UAAUxC,aAAa,CAACG,IAAY,EAAEV,IAAY,EAAoB;EACjC;IACjC,IAAI,EAAE,OAAO,IAAAgD,cAAO,GAAE,CAAC,IAAIF,eAAe,CAACG,GAAG,CAACjD,IAAI,CAAC,EAAE;MACpD,MAAM,IAAIkD,KAAK,CACZ,aAAYxC,IAAK,6BAA4BV,IAAK,gCAA+B,GAChF,sFAAsF,GACtF,qFAAqF,CACxF;IACH;EACF;EAEA,IAAI;IACiC;MACjC8C,eAAe,CAACK,GAAG,CAACnD,IAAI,CAAC;IAC3B;IACA,OAAO,OAAO,IAAAoD,oBAAmB,EAC/BpD,IAAI,EACH,qDAAoDU,IAAK,IAAG,GAC3D,4DAA4D,EAK9D,IAAI,CACL;EACH,CAAC,CAAC,OAAO2C,GAAG,EAAE;IACZA,GAAG,CAAClC,OAAO,GAAI,YAAWkC,GAAG,CAAClC,OAAQ,uBAAsBnB,IAAK,GAAE;IACnE,MAAMqD,GAAG;EACX,CAAC,SAAS;IAC2B;MACjCP,eAAe,CAACQ,MAAM,CAACtD,IAAI,CAAC;IAC9B;EACF;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["_debug","data","require","_path","_gensync","_async","_moduleTypes","_url","_importMetaResolve","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","debug","buildDebug","EXACT_RE","BABEL_PLUGIN_PREFIX_RE","BABEL_PRESET_PREFIX_RE","BABEL_PLUGIN_ORG_RE","BABEL_PRESET_ORG_RE","OTHER_PLUGIN_ORG_RE","OTHER_PRESET_ORG_RE","OTHER_ORG_DEFAULT_RE","resolvePlugin","name","dirname","resolveStandardizedName","resolvePreset","loadPlugin","filepath","requireModule","loadPreset","standardizeName","type","path","isAbsolute","isPreset","replace","resolveAlternativesHelper","standardizedName","code","message","oppositeType","tryRequireResolve","id","paths","v","w","split","process","versions","node","r","b","M","f","_findPath","_nodeModulePaths","concat","Error","tryImportMetaResolve","_x","_x2","_tryImportMetaResolve","options","importMetaResolve","resolveStandardizedNameForRequire","it","res","next","resolveStandardizedNameForImport","_x3","_x4","_x5","_resolveStandardizedNameForImport","parentUrl","pathToFileURL","join","href","fileURLToPath","gensync","sync","cwd","async","supportsESM","e","e2","LOADING_MODULES","Set","isAsync","has","add","loadCodeDefault","delete"],"sources":["../../../src/config/files/plugins.ts"],"sourcesContent":["/**\n * This file handles all logic for converting string-based configuration references into loaded objects.\n */\n\nimport buildDebug from \"debug\";\nimport path from \"path\";\nimport gensync, { type Handler } from \"gensync\";\nimport { isAsync } from \"../../gensync-utils/async\";\nimport loadCodeDefault, { supportsESM } from \"./module-types\";\nimport { fileURLToPath, pathToFileURL } from \"url\";\n\nimport importMetaResolve from \"./import-meta-resolve\";\n\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:plugins\");\n\nconst EXACT_RE = /^module:/;\nconst BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-plugin-)/;\nconst BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-preset-)/;\nconst BABEL_PLUGIN_ORG_RE = /^(@babel\\/)(?!plugin-|[^/]+\\/)/;\nconst BABEL_PRESET_ORG_RE = /^(@babel\\/)(?!preset-|[^/]+\\/)/;\nconst OTHER_PLUGIN_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-plugin(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_PRESET_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-preset(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;\n\nexport function* resolvePlugin(name: string, dirname: string): Handler {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return yield* resolveStandardizedName(\"plugin\", name, dirname);\n}\n\nexport function* resolvePreset(name: string, dirname: string): Handler {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return yield* resolveStandardizedName(\"preset\", name, dirname);\n}\n\nexport function* loadPlugin(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const filepath = yield* resolvePlugin(name, dirname);\n\n const value = yield* requireModule(\"plugin\", filepath);\n debug(\"Loaded plugin %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nexport function* loadPreset(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const filepath = yield* resolvePreset(name, dirname);\n\n const value = yield* requireModule(\"preset\", filepath);\n\n debug(\"Loaded preset %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nfunction standardizeName(type: \"plugin\" | \"preset\", name: string) {\n // Let absolute and relative paths through.\n if (path.isAbsolute(name)) return name;\n\n const isPreset = type === \"preset\";\n\n return (\n name\n // foo -> babel-preset-foo\n .replace(\n isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE,\n `babel-${type}-`,\n )\n // @babel/es2015 -> @babel/preset-es2015\n .replace(\n isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE,\n `$1${type}-`,\n )\n // @foo/mypreset -> @foo/babel-preset-mypreset\n .replace(\n isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE,\n `$1babel-${type}-`,\n )\n // @foo -> @foo/babel-preset\n .replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)\n // module:mypreset -> mypreset\n .replace(EXACT_RE, \"\")\n );\n}\n\ntype Result = { error: Error; value: null } | { error: null; value: T };\n\nfunction* resolveAlternativesHelper(\n type: \"plugin\" | \"preset\",\n name: string,\n): Iterator> {\n const standardizedName = standardizeName(type, name);\n const { error, value } = yield standardizedName;\n if (!error) return value;\n\n // @ts-expect-error code may not index error\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n if (standardizedName !== name && !(yield name).error) {\n error.message += `\\n- If you want to resolve \"${name}\", use \"module:${name}\"`;\n }\n\n if (!(yield standardizeName(type, \"@babel/\" + name)).error) {\n error.message += `\\n- Did you mean \"@babel/${name}\"?`;\n }\n\n const oppositeType = type === \"preset\" ? \"plugin\" : \"preset\";\n if (!(yield standardizeName(oppositeType, name)).error) {\n error.message += `\\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;\n }\n\n throw error;\n}\n\nfunction tryRequireResolve(\n id: Parameters[0],\n { paths: [dirname] }: Parameters[1],\n): Result {\n try {\n return { error: null, value: require.resolve(id, { paths: [dirname] }) };\n } catch (error) {\n return { error, value: null };\n }\n}\n\nasync function tryImportMetaResolve(\n id: Parameters[0],\n options: Parameters[1],\n): Promise> {\n try {\n return { error: null, value: await importMetaResolve(id, options) };\n } catch (error) {\n return { error, value: null };\n }\n}\n\nfunction resolveStandardizedNameForRequire(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(tryRequireResolve(res.value, { paths: [dirname] }));\n }\n return res.value;\n}\nasync function resolveStandardizedNameForImport(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const parentUrl = pathToFileURL(\n path.join(dirname, \"./babel-virtual-resolve-base.js\"),\n ).href;\n\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(await tryImportMetaResolve(res.value, parentUrl));\n }\n return fileURLToPath(res.value);\n}\n\nconst resolveStandardizedName = gensync<\n [type: \"plugin\" | \"preset\", name: string, dirname?: string],\n string\n>({\n sync(type, name, dirname = process.cwd()) {\n return resolveStandardizedNameForRequire(type, name, dirname);\n },\n async async(type, name, dirname = process.cwd()) {\n if (!supportsESM) {\n return resolveStandardizedNameForRequire(type, name, dirname);\n }\n\n try {\n return await resolveStandardizedNameForImport(type, name, dirname);\n } catch (e) {\n try {\n return resolveStandardizedNameForRequire(type, name, dirname);\n } catch (e2) {\n if (e.type === \"MODULE_NOT_FOUND\") throw e;\n if (e2.type === \"MODULE_NOT_FOUND\") throw e2;\n throw e;\n }\n }\n },\n});\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var LOADING_MODULES = new Set();\n}\nfunction* requireModule(type: string, name: string): Handler {\n if (!process.env.BABEL_8_BREAKING) {\n if (!(yield* isAsync()) && LOADING_MODULES.has(name)) {\n throw new Error(\n `Reentrant ${type} detected trying to load \"${name}\". This module is not ignored ` +\n \"and is trying to load itself while compiling itself, leading to a dependency cycle. \" +\n 'We recommend adding it to your \"ignore\" list in your babelrc, or to a .babelignore.',\n );\n }\n }\n\n try {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.add(name);\n }\n return yield* loadCodeDefault(\n name,\n `You appear to be using a native ECMAScript module ${type}, ` +\n \"which is only supported when running Babel asynchronously.\",\n // For backward compatibility, we need to support malformed presets\n // defined as separate named exports rather than a single default\n // export.\n // See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js\n true,\n );\n } catch (err) {\n err.message = `[BABEL]: ${err.message} (While processing: ${name})`;\n throw err;\n } finally {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.delete(name);\n }\n }\n}\n"],"mappings":";;;;;;;;;AAIA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAA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oD,CAAC;UAC1C,IAAIC,EAAE,CAACrD,IAAI,KAAK,kBAAkB,EAAE,MAAMqD,EAAE;UAC5C,MAAMD,CAAC;QACT;MACF;IAAC;EACH;AACF,CAAC,CAAC;AAEiC;EAEjC,IAAIE,eAAe,GAAG,IAAIC,GAAG,EAAE;AACjC;AACA,UAAU1D,aAAaA,CAACG,IAAY,EAAET,IAAY,EAAoB;EACjC;IACjC,IAAI,EAAE,OAAO,IAAAiE,cAAO,GAAE,CAAC,IAAIF,eAAe,CAACG,GAAG,CAAClE,IAAI,CAAC,EAAE;MACpD,MAAM,IAAImC,KAAK,CACZ,aAAY1B,IAAK,6BAA4BT,IAAK,gCAA+B,GAChF,sFAAsF,GACtF,qFAAqF,CACxF;IACH;EACF;EAEA,IAAI;IACiC;MACjC+D,eAAe,CAACI,GAAG,CAACnE,IAAI,CAAC;IAC3B;IACA,OAAO,OAAO,IAAAoE,oBAAe,EAC3BpE,IAAI,EACH,qDAAoDS,IAAK,IAAG,GAC3D,4DAA4D,EAK9D,IAAI,CACL;EACH,CAAC,CAAC,OAAOtB,GAAG,EAAE;IACZA,GAAG,CAAC8B,OAAO,GAAI,YAAW9B,GAAG,CAAC8B,OAAQ,uBAAsBjB,IAAK,GAAE;IACnE,MAAMb,GAAG;EACX,CAAC,SAAS;IAC2B;MACjC4E,eAAe,CAACM,MAAM,CAACrE,IAAI,CAAC;IAC9B;EACF;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/utils.js.map b/node_modules/@babel/core/lib/config/files/utils.js.map index 03629e1c0..894d40315 100644 --- a/node_modules/@babel/core/lib/config/files/utils.js.map +++ b/node_modules/@babel/core/lib/config/files/utils.js.map @@ -1 +1 @@ -{"version":3,"names":["makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","fs","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport * as fs from \"../../gensync-utils/fs\";\nimport nodeFs from \"fs\";\n\nexport function makeStaticFileCache(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator,\n ): Handler {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA;AAEA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,SAASA,mBAAmB,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAOK,EAAE,CAACC,QAAQ,CAACN,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAAS,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACO,MAAM,CAACC,UAAU,CAACR,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACO,MAAM,CAACE,QAAQ,CAACT,QAAQ,CAAC,CAACU,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC"} \ No newline at end of file +{"version":3,"names":["_caching","require","fs","_fs2","data","makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport * as fs from \"../../gensync-utils/fs\";\nimport nodeFs from \"fs\";\n\nexport function makeStaticFileCache(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator,\n ): Handler {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,EAAA,GAAAD,OAAA;AACA,SAAAE,KAAA;EAAA,MAAAC,IAAA,GAAAH,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASC,mBAAmBA,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAON,EAAE,CAACW,QAAQ,CAACL,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAASA,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACM,MAAM,CAACC,UAAU,CAACP,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACM,MAAM,CAACE,QAAQ,CAACR,QAAQ,CAAC,CAACS,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/full.js.map b/node_modules/@babel/core/lib/config/full.js.map index f2ee1c35c..208577580 100644 --- a/node_modules/@babel/core/lib/config/full.js.map +++ b/node_modules/@babel/core/lib/config/full.js.map @@ -1 +1 @@ -{"version":3,"names":["gensync","loadFullConfig","inputOpts","result","loadPrivatePartialConfig","options","context","fileHandling","optionDefaults","plugins","presets","Error","presetContext","targets","toDescriptor","item","desc","getItemDescriptor","presetsDescriptors","map","initialPluginsDescriptors","pluginDescriptorsByPass","passes","externalDependencies","ignored","enhanceError","recursePresetDescriptors","rawPresets","pluginDescriptorsPass","i","length","descriptor","preset","loadPresetDescriptor","e","code","checkNoUnwrappedItemOptionPairs","push","ownPass","chain","pass","unshift","splice","o","filter","p","forEach","opts","mergeOptions","pluginContext","assumptions","loadPluginDescriptors","descs","plugin","loadPluginDescriptor","slice","passPerPreset","freezeDeepArray","fn","arg1","arg2","test","message","filename","makeDescriptorLoader","apiFactory","makeWeakCache","value","dirname","alias","cache","factory","maybeAsync","api","JSON","stringify","isThenable","configured","mode","error","pluginDescriptorLoader","makePluginAPI","presetDescriptorLoader","makePresetAPI","instantiatePlugin","pluginObj","validatePluginObject","visitor","traverse","explode","inherits","inheritsDescriptor","name","undefined","forwardAsync","run","invalidate","data","pre","post","manipulateOptions","visitors","merge","Plugin","needsFilename","val","validateIfOptionNeedsFilename","include","exclude","formattedPresetName","ConfigError","join","validatePreset","overrides","overrideOptions","instantiatePreset","makeWeakCacheSync","validate","buildPresetChain","a","b","fns","Boolean","args","apply"],"sources":["../../src/config/full.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { forwardAsync, maybeAsync, isThenable } from \"../gensync-utils/async\";\n\nimport { mergeOptions } from \"./util\";\nimport * as context from \"../index\";\nimport Plugin from \"./plugin\";\nimport { getItemDescriptor } from \"./item\";\nimport { buildPresetChain } from \"./config-chain\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type {\n ConfigContext,\n ConfigChain,\n PresetInstance,\n} from \"./config-chain\";\nimport type { UnloadedDescriptor } from \"./config-descriptors\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching\";\nimport type { CacheConfigurator } from \"./caching\";\nimport {\n validate,\n checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options\";\nimport type { PluginItem } from \"./validation/options\";\nimport { validatePluginObject } from \"./validation/plugins\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api\";\n\nimport loadPrivatePartialConfig from \"./partial\";\nimport type { ValidatedOptions } from \"./validation/options\";\n\nimport type * as Context from \"./cache-contexts\";\nimport ConfigError from \"../errors/config-error\";\n\ntype LoadedDescriptor = {\n value: {};\n options: {};\n dirname: string;\n alias: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { InputOptions } from \"./validation/options\";\n\nexport type ResolvedConfig = {\n options: any;\n passes: PluginPasses;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array;\nexport type PluginPasses = Array;\n\nexport default gensync(function* loadFullConfig(\n inputOpts: unknown,\n): Handler {\n const result = yield* loadPrivatePartialConfig(inputOpts);\n if (!result) {\n return null;\n }\n const { options, context, fileHandling } = result;\n\n if (fileHandling === \"ignored\") {\n return null;\n }\n\n const optionDefaults = {};\n\n const { plugins, presets } = options;\n\n if (!plugins || !presets) {\n throw new Error(\"Assertion failure - plugins and presets exist\");\n }\n\n const presetContext: Context.FullPreset = {\n ...context,\n targets: options.targets,\n };\n\n const toDescriptor = (item: PluginItem) => {\n const desc = getItemDescriptor(item);\n if (!desc) {\n throw new Error(\"Assertion failure - must be config item\");\n }\n\n return desc;\n };\n\n const presetsDescriptors = presets.map(toDescriptor);\n const initialPluginsDescriptors = plugins.map(toDescriptor);\n const pluginDescriptorsByPass: Array> = [[]];\n const passes: Array> = [];\n\n const externalDependencies: DeepArray = [];\n\n const ignored = yield* enhanceError(\n context,\n function* recursePresetDescriptors(\n rawPresets: Array,\n pluginDescriptorsPass: Array,\n ): Handler {\n const presets: Array<{\n preset: ConfigChain | null;\n pass: Array;\n }> = [];\n\n for (let i = 0; i < rawPresets.length; i++) {\n const descriptor = rawPresets[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n }\n throw e;\n }\n\n externalDependencies.push(preset.externalDependencies);\n\n // Presets normally run in reverse order, but if they\n // have their own pass they run after the presets\n // in the previous pass.\n if (descriptor.ownPass) {\n presets.push({ preset: preset.chain, pass: [] });\n } else {\n presets.unshift({\n preset: preset.chain,\n pass: pluginDescriptorsPass,\n });\n }\n }\n }\n\n // resolve presets\n if (presets.length > 0) {\n // The passes are created in the same order as the preset list, but are inserted before any\n // existing additional passes.\n pluginDescriptorsByPass.splice(\n 1,\n 0,\n ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n );\n\n for (const { preset, pass } of presets) {\n if (!preset) return true;\n\n pass.push(...preset.plugins);\n\n const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n if (ignored) return true;\n\n preset.options.forEach(opts => {\n mergeOptions(optionDefaults, opts);\n });\n }\n }\n },\n )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n if (ignored) return null;\n\n const opts: any = optionDefaults;\n mergeOptions(opts, options);\n\n const pluginContext: Context.FullPlugin = {\n ...presetContext,\n assumptions: opts.assumptions ?? {},\n };\n\n yield* enhanceError(context, function* loadPluginDescriptors() {\n pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n for (const descs of pluginDescriptorsByPass) {\n const pass: Plugin[] = [];\n passes.push(pass);\n\n for (let i = 0; i < descs.length; i++) {\n const descriptor: UnloadedDescriptor = descs[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n }\n throw e;\n }\n pass.push(plugin);\n\n externalDependencies.push(plugin.externalDependencies);\n }\n }\n }\n })();\n\n opts.plugins = passes[0];\n opts.presets = passes\n .slice(1)\n .filter(plugins => plugins.length > 0)\n .map(plugins => ({ plugins }));\n opts.passPerPreset = opts.presets.length > 0;\n\n return {\n options: opts,\n passes: passes,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n});\n\nfunction enhanceError(context: ConfigContext, fn: T): T {\n return function* (arg1: unknown, arg2: unknown) {\n try {\n return yield* fn(arg1, arg2);\n } catch (e) {\n // There are a few case where thrown errors will try to annotate themselves multiple times, so\n // to keep things simple we just bail out if re-wrapping the message.\n if (!/^\\[BABEL\\]/.test(e.message)) {\n e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n e.message\n }`;\n }\n\n throw e;\n }\n } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = (\n apiFactory: (\n cache: CacheConfigurator,\n externalDependencies: Array,\n ) => API,\n) =>\n makeWeakCache(function* (\n { value, options, dirname, alias }: UnloadedDescriptor,\n cache: CacheConfigurator,\n ): Handler {\n // Disabled presets should already have been filtered out\n if (options === false) throw new Error(\"Assertion failure\");\n\n options = options || {};\n\n const externalDependencies: Array = [];\n\n let item = value;\n if (typeof value === \"function\") {\n const factory = maybeAsync(\n value,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n const api = {\n ...context,\n ...apiFactory(cache, externalDependencies),\n };\n try {\n item = yield* factory(api, options, dirname);\n } catch (e) {\n if (alias) {\n e.message += ` (While processing: ${JSON.stringify(alias)})`;\n }\n throw e;\n }\n }\n\n if (!item || typeof item !== \"object\") {\n throw new Error(\"Plugin/Preset did not return an object.\");\n }\n\n if (isThenable(item)) {\n // @ts-expect-error - if we want to support async plugins\n yield* [];\n\n throw new Error(\n `You appear to be using a promise as a plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version. ` +\n `As an alternative, you can prefix the promise with \"await\". ` +\n `(While processing: ${JSON.stringify(alias)})`,\n );\n }\n\n if (\n externalDependencies.length > 0 &&\n (!cache.configured() || cache.mode() === \"forever\")\n ) {\n let error =\n `A plugin/preset has external untracked dependencies ` +\n `(${externalDependencies[0]}), but the cache `;\n if (!cache.configured()) {\n error += `has not been configured to be invalidated when the external dependencies change. `;\n } else {\n error += ` has been configured to never be invalidated. `;\n }\n error +=\n `Plugins/presets should configure their cache to be invalidated when the external ` +\n `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n `(While processing: ${JSON.stringify(alias)})`;\n\n throw new Error(error);\n }\n\n return {\n value: item,\n options,\n dirname,\n alias,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n Context.SimplePlugin,\n PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n Context.SimplePreset,\n PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n cache: CacheConfigurator,\n): Handler {\n const pluginObj = validatePluginObject(value);\n\n const plugin = {\n ...pluginObj,\n };\n if (plugin.visitor) {\n plugin.visitor = traverse.explode({\n ...plugin.visitor,\n });\n }\n\n if (plugin.inherits) {\n const inheritsDescriptor: UnloadedDescriptor = {\n name: undefined,\n alias: `${alias}$inherits`,\n value: plugin.inherits,\n options,\n dirname,\n };\n\n const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n // If the inherited plugin changes, reinstantiate this plugin.\n return cache.invalidate(data => run(inheritsDescriptor, data));\n });\n\n plugin.pre = chain(inherits.pre, plugin.pre);\n plugin.post = chain(inherits.post, plugin.post);\n plugin.manipulateOptions = chain(\n inherits.manipulateOptions,\n plugin.manipulateOptions,\n );\n plugin.visitor = traverse.visitors.merge([\n inherits.visitor || {},\n plugin.visitor || {},\n ]);\n\n if (inherits.externalDependencies.length > 0) {\n if (externalDependencies.length === 0) {\n externalDependencies = inherits.externalDependencies;\n } else {\n externalDependencies = freezeDeepArray([\n externalDependencies,\n inherits.externalDependencies,\n ]);\n }\n }\n }\n\n return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.SimplePlugin,\n): Handler {\n if (descriptor.value instanceof Plugin) {\n if (descriptor.options) {\n throw new Error(\n \"Passed options to an existing Plugin instance will not work.\",\n );\n }\n\n return descriptor.value;\n }\n\n return yield* instantiatePlugin(\n yield* pluginDescriptorLoader(descriptor, context),\n context,\n );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n options: ValidatedOptions,\n descriptor: UnloadedDescriptor,\n): void => {\n if (\n needsFilename(options.test) ||\n needsFilename(options.include) ||\n needsFilename(options.exclude)\n ) {\n const formattedPresetName = descriptor.name\n ? `\"${descriptor.name}\"`\n : \"/* your preset */\";\n throw new ConfigError(\n [\n `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n `\\`\\`\\``,\n `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n `\\`\\`\\``,\n `See https://babeljs.io/docs/en/options#filename for more information.`,\n ].join(\"\\n\"),\n );\n }\n};\n\nconst validatePreset = (\n preset: PresetInstance,\n context: ConfigContext,\n descriptor: UnloadedDescriptor,\n): void => {\n if (!context.filename) {\n const { options } = preset;\n validateIfOptionNeedsFilename(options, descriptor);\n if (options.overrides) {\n options.overrides.forEach(overrideOptions =>\n validateIfOptionNeedsFilename(overrideOptions, descriptor),\n );\n }\n }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n ({\n value,\n dirname,\n alias,\n externalDependencies,\n }: LoadedDescriptor): PresetInstance => {\n return {\n options: validate(\"preset\", value),\n alias,\n dirname,\n externalDependencies,\n };\n },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.FullPreset,\n): Handler<{\n chain: ConfigChain | null;\n externalDependencies: ReadonlyDeepArray;\n}> {\n const preset = instantiatePreset(\n yield* presetDescriptorLoader(descriptor, context),\n );\n validatePreset(preset, context, descriptor);\n return {\n chain: yield* buildPresetChain(preset, context),\n externalDependencies: preset.externalDependencies,\n };\n}\n\nfunction chain(\n a: undefined | ((...args: Args) => void),\n b: undefined | ((...args: Args) => void),\n) {\n const fns = [a, b].filter(Boolean);\n if (fns.length <= 1) return fns[0];\n\n return function (this: unknown, ...args: unknown[]) {\n for (const fn of fns) {\n fn.apply(this, args);\n }\n };\n}\n"],"mappings":";;;;;;AA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ED,IAAI,CAAC;IACtB;EACF,CAAC;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_async","_util","context","_plugin","_item","_configChain","_deepArray","_traverse","_caching","_options","_plugins","_configApi","_partial","_configError","_default","gensync","loadFullConfig","inputOpts","_opts$assumptions","result","loadPrivatePartialConfig","options","fileHandling","optionDefaults","plugins","presets","Error","presetContext","Object","assign","targets","toDescriptor","item","desc","getItemDescriptor","presetsDescriptors","map","initialPluginsDescriptors","pluginDescriptorsByPass","passes","externalDependencies","ignored","enhanceError","recursePresetDescriptors","rawPresets","pluginDescriptorsPass","i","length","descriptor","preset","loadPresetDescriptor","e","code","checkNoUnwrappedItemOptionPairs","push","ownPass","chain","pass","unshift","splice","o","filter","p","forEach","opts","mergeOptions","pluginContext","assumptions","loadPluginDescriptors","descs","plugin","loadPluginDescriptor","slice","passPerPreset","freezeDeepArray","exports","default","fn","arg1","arg2","test","message","_context$filename","filename","makeDescriptorLoader","apiFactory","makeWeakCache","value","dirname","alias","cache","factory","maybeAsync","api","JSON","stringify","isThenable","configured","mode","error","pluginDescriptorLoader","makePluginAPI","presetDescriptorLoader","makePresetAPI","instantiatePlugin","pluginObj","validatePluginObject","visitor","traverse","explode","inherits","inheritsDescriptor","name","undefined","forwardAsync","run","invalidate","pre","post","manipulateOptions","visitors","merge","Plugin","needsFilename","val","validateIfOptionNeedsFilename","include","exclude","formattedPresetName","ConfigError","join","validatePreset","overrides","overrideOptions","instantiatePreset","makeWeakCacheSync","validate","buildPresetChain","a","b","fns","Boolean","args","apply"],"sources":["../../src/config/full.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { forwardAsync, maybeAsync, isThenable } from \"../gensync-utils/async\";\n\nimport { mergeOptions } from \"./util\";\nimport * as context from \"../index\";\nimport Plugin from \"./plugin\";\nimport { getItemDescriptor } from \"./item\";\nimport { buildPresetChain } from \"./config-chain\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type {\n ConfigContext,\n ConfigChain,\n PresetInstance,\n} from \"./config-chain\";\nimport type { UnloadedDescriptor } from \"./config-descriptors\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching\";\nimport type { CacheConfigurator } from \"./caching\";\nimport {\n validate,\n checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options\";\nimport type { PluginItem } from \"./validation/options\";\nimport { validatePluginObject } from \"./validation/plugins\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api\";\n\nimport loadPrivatePartialConfig from \"./partial\";\nimport type { ValidatedOptions } from \"./validation/options\";\n\nimport type * as Context from \"./cache-contexts\";\nimport ConfigError from \"../errors/config-error\";\n\ntype LoadedDescriptor = {\n value: {};\n options: {};\n dirname: string;\n alias: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { InputOptions } from \"./validation/options\";\n\nexport type ResolvedConfig = {\n options: any;\n passes: PluginPasses;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array;\nexport type PluginPasses = Array;\n\nexport default gensync(function* loadFullConfig(\n inputOpts: unknown,\n): Handler {\n const result = yield* loadPrivatePartialConfig(inputOpts);\n if (!result) {\n return null;\n }\n const { options, context, fileHandling } = result;\n\n if (fileHandling === \"ignored\") {\n return null;\n }\n\n const optionDefaults = {};\n\n const { plugins, presets } = options;\n\n if (!plugins || !presets) {\n throw new Error(\"Assertion failure - plugins and presets exist\");\n }\n\n const presetContext: Context.FullPreset = {\n ...context,\n targets: options.targets,\n };\n\n const toDescriptor = (item: PluginItem) => {\n const desc = getItemDescriptor(item);\n if (!desc) {\n throw new Error(\"Assertion failure - must be config item\");\n }\n\n return desc;\n };\n\n const presetsDescriptors = presets.map(toDescriptor);\n const initialPluginsDescriptors = plugins.map(toDescriptor);\n const pluginDescriptorsByPass: Array> = [[]];\n const passes: Array> = [];\n\n const externalDependencies: DeepArray = [];\n\n const ignored = yield* enhanceError(\n context,\n function* recursePresetDescriptors(\n rawPresets: Array,\n pluginDescriptorsPass: Array,\n ): Handler {\n const presets: Array<{\n preset: ConfigChain | null;\n pass: Array;\n }> = [];\n\n for (let i = 0; i < rawPresets.length; i++) {\n const descriptor = rawPresets[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n }\n throw e;\n }\n\n externalDependencies.push(preset.externalDependencies);\n\n // Presets normally run in reverse order, but if they\n // have their own pass they run after the presets\n // in the previous pass.\n if (descriptor.ownPass) {\n presets.push({ preset: preset.chain, pass: [] });\n } else {\n presets.unshift({\n preset: preset.chain,\n pass: pluginDescriptorsPass,\n });\n }\n }\n }\n\n // resolve presets\n if (presets.length > 0) {\n // The passes are created in the same order as the preset list, but are inserted before any\n // existing additional passes.\n pluginDescriptorsByPass.splice(\n 1,\n 0,\n ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n );\n\n for (const { preset, pass } of presets) {\n if (!preset) return true;\n\n pass.push(...preset.plugins);\n\n const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n if (ignored) return true;\n\n preset.options.forEach(opts => {\n mergeOptions(optionDefaults, opts);\n });\n }\n }\n },\n )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n if (ignored) return null;\n\n const opts: any = optionDefaults;\n mergeOptions(opts, options);\n\n const pluginContext: Context.FullPlugin = {\n ...presetContext,\n assumptions: opts.assumptions ?? {},\n };\n\n yield* enhanceError(context, function* loadPluginDescriptors() {\n pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n for (const descs of pluginDescriptorsByPass) {\n const pass: Plugin[] = [];\n passes.push(pass);\n\n for (let i = 0; i < descs.length; i++) {\n const descriptor: UnloadedDescriptor = descs[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n }\n throw e;\n }\n pass.push(plugin);\n\n externalDependencies.push(plugin.externalDependencies);\n }\n }\n }\n })();\n\n opts.plugins = passes[0];\n opts.presets = passes\n .slice(1)\n .filter(plugins => plugins.length > 0)\n .map(plugins => ({ plugins }));\n opts.passPerPreset = opts.presets.length > 0;\n\n return {\n options: opts,\n passes: passes,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n});\n\nfunction enhanceError(context: ConfigContext, fn: T): T {\n return function* (arg1: unknown, arg2: unknown) {\n try {\n return yield* fn(arg1, arg2);\n } catch (e) {\n // There are a few case where thrown errors will try to annotate themselves multiple times, so\n // to keep things simple we just bail out if re-wrapping the message.\n if (!/^\\[BABEL\\]/.test(e.message)) {\n e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n e.message\n }`;\n }\n\n throw e;\n }\n } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = (\n apiFactory: (\n cache: CacheConfigurator,\n externalDependencies: Array,\n ) => API,\n) =>\n makeWeakCache(function* (\n { value, options, dirname, alias }: UnloadedDescriptor,\n cache: CacheConfigurator,\n ): Handler {\n // Disabled presets should already have been filtered out\n if (options === false) throw new Error(\"Assertion failure\");\n\n options = options || {};\n\n const externalDependencies: Array = [];\n\n let item = value;\n if (typeof value === \"function\") {\n const factory = maybeAsync(\n value,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n const api = {\n ...context,\n ...apiFactory(cache, externalDependencies),\n };\n try {\n item = yield* factory(api, options, dirname);\n } catch (e) {\n if (alias) {\n e.message += ` (While processing: ${JSON.stringify(alias)})`;\n }\n throw e;\n }\n }\n\n if (!item || typeof item !== \"object\") {\n throw new Error(\"Plugin/Preset did not return an object.\");\n }\n\n if (isThenable(item)) {\n // @ts-expect-error - if we want to support async plugins\n yield* [];\n\n throw new Error(\n `You appear to be using a promise as a plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version. ` +\n `As an alternative, you can prefix the promise with \"await\". ` +\n `(While processing: ${JSON.stringify(alias)})`,\n );\n }\n\n if (\n externalDependencies.length > 0 &&\n (!cache.configured() || cache.mode() === \"forever\")\n ) {\n let error =\n `A plugin/preset has external untracked dependencies ` +\n `(${externalDependencies[0]}), but the cache `;\n if (!cache.configured()) {\n error += `has not been configured to be invalidated when the external dependencies change. `;\n } else {\n error += ` has been configured to never be invalidated. `;\n }\n error +=\n `Plugins/presets should configure their cache to be invalidated when the external ` +\n `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n `(While processing: ${JSON.stringify(alias)})`;\n\n throw new Error(error);\n }\n\n return {\n value: item,\n options,\n dirname,\n alias,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n Context.SimplePlugin,\n PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n Context.SimplePreset,\n PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n cache: CacheConfigurator,\n): Handler {\n const pluginObj = validatePluginObject(value);\n\n const plugin = {\n ...pluginObj,\n };\n if (plugin.visitor) {\n plugin.visitor = traverse.explode({\n ...plugin.visitor,\n });\n }\n\n if (plugin.inherits) {\n const inheritsDescriptor: UnloadedDescriptor = {\n name: undefined,\n alias: `${alias}$inherits`,\n value: plugin.inherits,\n options,\n dirname,\n };\n\n const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n // If the inherited plugin changes, reinstantiate this plugin.\n return cache.invalidate(data => run(inheritsDescriptor, data));\n });\n\n plugin.pre = chain(inherits.pre, plugin.pre);\n plugin.post = chain(inherits.post, plugin.post);\n plugin.manipulateOptions = chain(\n inherits.manipulateOptions,\n plugin.manipulateOptions,\n );\n plugin.visitor = traverse.visitors.merge([\n inherits.visitor || {},\n plugin.visitor || {},\n ]);\n\n if (inherits.externalDependencies.length > 0) {\n if (externalDependencies.length === 0) {\n externalDependencies = inherits.externalDependencies;\n } else {\n externalDependencies = freezeDeepArray([\n externalDependencies,\n inherits.externalDependencies,\n ]);\n }\n }\n }\n\n return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.SimplePlugin,\n): Handler {\n if (descriptor.value instanceof Plugin) {\n if (descriptor.options) {\n throw new Error(\n \"Passed options to an existing Plugin instance will not work.\",\n );\n }\n\n return descriptor.value;\n }\n\n return yield* instantiatePlugin(\n yield* pluginDescriptorLoader(descriptor, context),\n context,\n );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n options: ValidatedOptions,\n descriptor: UnloadedDescriptor,\n): void => {\n if (\n needsFilename(options.test) ||\n needsFilename(options.include) ||\n needsFilename(options.exclude)\n ) {\n const formattedPresetName = descriptor.name\n ? `\"${descriptor.name}\"`\n : \"/* your preset */\";\n throw new ConfigError(\n [\n `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n `\\`\\`\\``,\n `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n `\\`\\`\\``,\n `See https://babeljs.io/docs/en/options#filename for more information.`,\n ].join(\"\\n\"),\n );\n }\n};\n\nconst validatePreset = (\n preset: PresetInstance,\n context: ConfigContext,\n descriptor: UnloadedDescriptor,\n): void => {\n if (!context.filename) {\n const { options } = preset;\n validateIfOptionNeedsFilename(options, descriptor);\n if (options.overrides) {\n options.overrides.forEach(overrideOptions =>\n validateIfOptionNeedsFilename(overrideOptions, descriptor),\n );\n }\n }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n ({\n value,\n dirname,\n alias,\n externalDependencies,\n }: LoadedDescriptor): PresetInstance => {\n return {\n options: validate(\"preset\", value),\n alias,\n dirname,\n externalDependencies,\n };\n },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.FullPreset,\n): Handler<{\n chain: ConfigChain | null;\n externalDependencies: ReadonlyDeepArray;\n}> {\n const preset = instantiatePreset(\n yield* presetDescriptorLoader(descriptor, context),\n );\n validatePreset(preset, context, descriptor);\n return {\n chain: yield* buildPresetChain(preset, context),\n externalDependencies: preset.externalDependencies,\n };\n}\n\nfunction chain(\n a: undefined | ((...args: Args) => void),\n b: undefined | ((...args: Args) => void),\n) {\n const fns = [a, b].filter(Boolean);\n if (fns.length <= 1) return fns[0];\n\n return function (this: unknown, ...args: unknown[]) {\n for (const fn of fns) {\n fn.apply(this, args);\n }\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,MAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAQA,SAAAQ,UAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,SAAA,YAAAA,CAAA;IAAA,OAAAT,IAA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AC;AACH;AAEA,SAASgB,KAAKA,CACZkF,CAAwC,EACxCC,CAAwC,EACxC;EACA,MAAMC,GAAG,GAAG,CAACF,CAAC,EAAEC,CAAC,CAAC,CAAC9E,MAAM,CAACgF,OAAO,CAAC;EAClC,IAAID,GAAG,CAAC7F,MAAM,IAAI,CAAC,EAAE,OAAO6F,GAAG,CAAC,CAAC,CAAC;EAElC,OAAO,UAAyB,GAAGE,IAAe,EAAE;IAClD,KAAK,MAAMjE,EAAE,IAAI+D,GAAG,EAAE;MACpB/D,EAAE,CAACkE,KAAK,CAAC,IAAI,EAAED,IAAI,CAAC;IACtB;EACF,CAAC;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js.map b/node_modules/@babel/core/lib/config/helpers/config-api.js.map index a5483bb1e..c7b094caf 100644 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js.map +++ b/node_modules/@babel/core/lib/config/helpers/config-api.js.map @@ -1 +1 @@ -{"version":3,"names":["makeConfigAPI","cache","env","value","using","data","envName","assertSimpleType","Array","isArray","some","entry","Error","caller","cb","version","coreVersion","simple","async","assertVersion","makePresetAPI","externalDependencies","targets","JSON","parse","stringify","addExternalDependency","ref","push","makePluginAPI","assumption","name","assumptions","range","Number","isInteger","semver","satisfies","limit","stackTraceLimit","err","Object","assign","code"],"sources":["../../../src/config/helpers/config-api.ts"],"sourcesContent":["import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../\";\nimport { assertSimpleType } from \"../caching\";\nimport type {\n CacheConfigurator,\n SimpleCacheConfigurator,\n SimpleType,\n} from \"../caching\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n (): string;\n (extractor: (babelEnv: string) => T): T;\n (envVar: string): boolean;\n (envVars: Array): boolean;\n};\n\ntype CallerFactory = (\n extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n) => SimpleType;\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n version: string;\n cache: SimpleCacheConfigurator;\n env: EnvFunction;\n async: () => boolean;\n assertVersion: typeof assertVersion;\n caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n targets: TargetsFunction;\n addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI(\n cache: CacheConfigurator,\n): ConfigAPI {\n // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n // and the `as any` type cast, TypeScript crashes in an infinite\n // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n // PR, we should check if it still crashes and report it to the TS team.\n const env: EnvFunction = ((\n value: string | string[] | ((babelEnv: string) => T),\n ) =>\n cache.using(data => {\n if (typeof value === \"undefined\") return data.envName;\n if (typeof value === \"function\") {\n return assertSimpleType(value(data.envName));\n }\n return (Array.isArray(value) ? value : [value]).some(entry => {\n if (typeof entry !== \"string\") {\n throw new Error(\"Unexpected non-string value\");\n }\n return entry === data.envName;\n });\n })) as any;\n\n const caller = (cb: {\n (CallerMetadata: CallerMetadata | undefined): SimpleType;\n }) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n return {\n version: coreVersion,\n cache: cache.simple(),\n // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n env,\n async: () => false,\n caller,\n assertVersion,\n };\n}\n\nexport function makePresetAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PresetAPI {\n const targets = () =>\n // We are using JSON.parse/JSON.stringify because it's only possible to cache\n // primitive values. We can safely stringify the targets object because it\n // only contains strings as its properties.\n // Please make the Record and Tuple proposal happen!\n JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n const addExternalDependency = (ref: string) => {\n externalDependencies.push(ref);\n };\n\n return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PluginAPI {\n const assumption = (name: string) =>\n cache.using(data => data.assumptions[name]);\n\n return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n if (typeof range === \"number\") {\n if (!Number.isInteger(range)) {\n throw new Error(\"Expected string or integer value.\");\n }\n range = `^${range}.0.0-0`;\n }\n if (typeof range !== \"string\") {\n throw new Error(\"Expected string or integer value.\");\n }\n\n if (semver.satisfies(coreVersion, range)) return;\n\n const limit = Error.stackTraceLimit;\n\n if (typeof limit === \"number\" && limit < 25) {\n // Bump up the limit if needed so that users are more likely\n // to be able to see what is calling Babel.\n Error.stackTraceLimit = 25;\n }\n\n const err = new Error(\n `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n `If you are sure you have a compatible version of @babel/core, ` +\n `it is likely that something in your build process is loading the ` +\n `wrong version. Inspect the stack trace of this error to look for ` +\n `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n `to see what is calling Babel.`,\n );\n\n if (typeof limit === \"number\") {\n Error.stackTraceLimit = limit;\n }\n\n throw Object.assign(err, {\n code: \"BABEL_VERSION_UNSUPPORTED\",\n version: coreVersion,\n range,\n });\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;AACA;AA0CO,SAASA,aAAa,CAC3BC,KAAqC,EAC1B;EAKX,MAAMC,GAAgB,GACpBC,KAAuD,IAEvDF,KAAK,CAACG,KAAK,CAACC,IAAI,IAAI;IAClB,IAAI,OAAOF,KAAK,KAAK,WAAW,EAAE,OAAOE,IAAI,CAACC,OAAO;IACrD,IAAI,OAAOH,KAAK,KAAK,UAAU,EAAE;MAC/B,OAAO,IAAAI,yBAAgB,EAACJ,KAAK,CAACE,IAAI,CAACC,OAAO,CAAC,CAAC;IAC9C;IACA,OAAO,CAACE,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,GAAGA,KAA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;EACnD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,IAAI,CAACC,MAAM,CAACC,SAAS,CAACF,KAAK,CAAC,EAAE;MAC5B,MAAM,IAAIrB,KAAK,CAAC,mCAAmC,CAAC;IACtD;IACAqB,KAAK,GAAI,IAAGA,KAAM,QAAO;EAC3B;EACA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,MAAM,IAAIrB,KAAK,CAAC,mCAAmC,CAAC;EACtD;EAEA,IAAIwB,SAAM,CAACC,SAAS,CAACrB,SAAW,EAAEiB,KAAK,CAAC,EAAE;EAE1C,MAAMK,KAAK,GAAG1B,KAAK,CAAC2B,eAAe;EAEnC,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAIA,KAAK,GAAG,EAAE,EAAE;IAG3C1B,KAAK,CAAC2B,eAAe,GAAG,EAAE;EAC5B;EAEA,MAAMC,GAAG,GAAG,IAAI5B,KAAK,CAClB,mBAAkBqB,KAAM,2BAA0BjB,SAAY,KAAI,GAChE,gEAA+D,GAC/D,mEAAkE,GAClE,mEAAkE,GAClE,qEAAoE,GACpE,+BAA8B,CAClC;EAED,IAAI,OAAOsB,KAAK,KAAK,QAAQ,EAAE;IAC7B1B,KAAK,CAAC2B,eAAe,GAAGD,KAAK;EAC/B;EAEA,MAAMG,MAAM,CAACC,MAAM,CAACF,GAAG,EAAE;IACvBG,IAAI,EAAE,2BAA2B;IACjC5B,OAAO,EAAEC,SAAW;IACpBiB;EACF,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file +{"version":3,"names":["_semver","data","require","_","_caching","makeConfigAPI","cache","env","value","using","envName","assertSimpleType","Array","isArray","some","entry","Error","caller","cb","version","coreVersion","simple","async","assertVersion","makePresetAPI","externalDependencies","targets","JSON","parse","stringify","addExternalDependency","ref","push","Object","assign","makePluginAPI","assumption","name","assumptions","range","Number","isInteger","semver","satisfies","limit","stackTraceLimit","err","code"],"sources":["../../../src/config/helpers/config-api.ts"],"sourcesContent":["import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../\";\nimport { assertSimpleType } from \"../caching\";\nimport type {\n CacheConfigurator,\n SimpleCacheConfigurator,\n SimpleType,\n} from \"../caching\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n (): string;\n (extractor: (babelEnv: string) => T): T;\n (envVar: string): boolean;\n (envVars: Array): boolean;\n};\n\ntype CallerFactory = (\n extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n) => SimpleType;\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n version: string;\n cache: SimpleCacheConfigurator;\n env: EnvFunction;\n async: () => boolean;\n assertVersion: typeof assertVersion;\n caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n targets: TargetsFunction;\n addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI(\n cache: CacheConfigurator,\n): ConfigAPI {\n // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n // and the `as any` type cast, TypeScript crashes in an infinite\n // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n // PR, we should check if it still crashes and report it to the TS team.\n const env: EnvFunction = ((\n value: string | string[] | ((babelEnv: string) => T),\n ) =>\n cache.using(data => {\n if (typeof value === \"undefined\") return data.envName;\n if (typeof value === \"function\") {\n return assertSimpleType(value(data.envName));\n }\n return (Array.isArray(value) ? value : [value]).some(entry => {\n if (typeof entry !== \"string\") {\n throw new Error(\"Unexpected non-string value\");\n }\n return entry === data.envName;\n });\n })) as any;\n\n const caller = (cb: {\n (CallerMetadata: CallerMetadata | undefined): SimpleType;\n }) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n return {\n version: coreVersion,\n cache: cache.simple(),\n // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n env,\n async: () => false,\n caller,\n assertVersion,\n };\n}\n\nexport function makePresetAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PresetAPI {\n const targets = () =>\n // We are using JSON.parse/JSON.stringify because it's only possible to cache\n // primitive values. We can safely stringify the targets object because it\n // only contains strings as its properties.\n // Please make the Record and Tuple proposal happen!\n JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n const addExternalDependency = (ref: string) => {\n externalDependencies.push(ref);\n };\n\n return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PluginAPI {\n const assumption = (name: string) =>\n cache.using(data => data.assumptions[name]);\n\n return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n if (typeof range === \"number\") {\n if (!Number.isInteger(range)) {\n throw new Error(\"Expected string or integer value.\");\n }\n range = `^${range}.0.0-0`;\n }\n if (typeof range !== \"string\") {\n throw new Error(\"Expected string or integer value.\");\n }\n\n if (semver.satisfies(coreVersion, range)) return;\n\n const limit = Error.stackTraceLimit;\n\n if (typeof limit === \"number\" && limit < 25) {\n // Bump up the limit if needed so that users are more likely\n // to be able to see what is calling Babel.\n Error.stackTraceLimit = 25;\n }\n\n const err = new Error(\n `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n `If you are sure you have a compatible version of @babel/core, ` +\n `it is likely that something in your build process is loading the ` +\n `wrong version. Inspect the stack trace of this error to look for ` +\n `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n `to see what is calling Babel.`,\n );\n\n if (typeof limit === \"number\") {\n Error.stackTraceLimit = limit;\n }\n\n throw Object.assign(err, {\n code: \"BABEL_VERSION_UNSUPPORTED\",\n version: coreVersion,\n range,\n });\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YA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,mEAAkE,GAClE,mEAAkE,GAClE,qEAAoE,GACpE,+BAA8B,CAClC;EAED,IAAI,OAAOwB,KAAK,KAAK,QAAQ,EAAE;IAC7B5B,KAAK,CAAC6B,eAAe,GAAGD,KAAK;EAC/B;EAEA,MAAMX,MAAM,CAACC,MAAM,CAACY,GAAG,EAAE;IACvBC,IAAI,EAAE,2BAA2B;IACjC5B,OAAO,EAAEC,SAAW;IACpBmB;EACF,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/deep-array.js.map b/node_modules/@babel/core/lib/config/helpers/deep-array.js.map index ce48d51b4..b1d521890 100644 --- a/node_modules/@babel/core/lib/config/helpers/deep-array.js.map +++ b/node_modules/@babel/core/lib/config/helpers/deep-array.js.map @@ -1 +1 @@ -{"version":3,"names":["finalize","deepArr","Object","freeze","flattenToSet","arr","result","Set","stack","length","el","pop","Array","isArray","push","add"],"sources":["../../../src/config/helpers/deep-array.ts"],"sourcesContent":["export type DeepArray = Array>;\n\n// Just to make sure that DeepArray is not assignable to ReadonlyDeepArray\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray = ReadonlyArray> & {\n [__marker]: true;\n};\n\nexport function finalize(deepArr: DeepArray): ReadonlyDeepArray {\n return Object.freeze(deepArr) as ReadonlyDeepArray;\n}\n\nexport function flattenToSet(\n arr: ReadonlyDeepArray,\n): Set {\n const result = new Set();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray);\n else result.add(el as T);\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;AAQO,SAASA,QAAQ,CAAIC,OAAqB,EAAwB;EACvE,OAAOC,MAAM,CAACC,MAAM,CAACF,OAAO,CAAC;AAC/B;AAEO,SAASG,YAAY,CAC1BC,GAAyB,EACjB;EACR,MAAMC,MAAM,GAAG,IAAIC,GAAG,EAAK;EAC3B,MAAMC,KAAK,GAAG,CAACH,GAAG,CAAC;EACnB,OAAOG,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;IACvB,KAAK,MAAMC,EAAE,IAAIF,KAAK,CAACG,GAAG,EAAE,EAAE;MAC5B,IAAIC,KAAK,CAACC,OAAO,CAACH,EAAE,CAAC,EAAEF,KAAK,CAACM,IAAI,CAACJ,EAAE,CAAyB,CAAC,KACzDJ,MAAM,CAACS,GAAG,CAACL,EAAE,CAAM;IAC1B;EACF;EACA,OAAOJ,MAAM;AACf;AAAC"} \ No newline at end of file +{"version":3,"names":["finalize","deepArr","Object","freeze","flattenToSet","arr","result","Set","stack","length","el","pop","Array","isArray","push","add"],"sources":["../../../src/config/helpers/deep-array.ts"],"sourcesContent":["export type DeepArray = Array>;\n\n// Just to make sure that DeepArray is not assignable to ReadonlyDeepArray\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray = ReadonlyArray> & {\n [__marker]: true;\n};\n\nexport function finalize(deepArr: DeepArray): ReadonlyDeepArray {\n return Object.freeze(deepArr) as ReadonlyDeepArray;\n}\n\nexport function flattenToSet(\n arr: ReadonlyDeepArray,\n): Set {\n const result = new Set();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray);\n else result.add(el as T);\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;AAQO,SAASA,QAAQA,CAAIC,OAAqB,EAAwB;EACvE,OAAOC,MAAM,CAACC,MAAM,CAACF,OAAO,CAAC;AAC/B;AAEO,SAASG,YAAYA,CAC1BC,GAAyB,EACjB;EACR,MAAMC,MAAM,GAAG,IAAIC,GAAG,EAAK;EAC3B,MAAMC,KAAK,GAAG,CAACH,GAAG,CAAC;EACnB,OAAOG,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;IACvB,KAAK,MAAMC,EAAE,IAAIF,KAAK,CAACG,GAAG,EAAE,EAAE;MAC5B,IAAIC,KAAK,CAACC,OAAO,CAACH,EAAE,CAAC,EAAEF,KAAK,CAACM,IAAI,CAACJ,EAAE,CAAyB,CAAC,KACzDJ,MAAM,CAACS,GAAG,CAACL,EAAE,CAAM;IAC1B;EACF;EACA,OAAOJ,MAAM;AACf;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js.map b/node_modules/@babel/core/lib/config/helpers/environment.js.map index 5992a64b9..e71555c9a 100644 --- a/node_modules/@babel/core/lib/config/helpers/environment.js.map +++ b/node_modules/@babel/core/lib/config/helpers/environment.js.map @@ -1 +1 @@ -{"version":3,"names":["getEnv","defaultValue","process","env","BABEL_ENV","NODE_ENV"],"sources":["../../../src/config/helpers/environment.ts"],"sourcesContent":["export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAM,CAACC,YAAoB,GAAG,aAAa,EAAU;EACnE,OAAOC,OAAO,CAACC,GAAG,CAACC,SAAS,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAQ,IAAIJ,YAAY;AACtE;AAAC"} \ No newline at end of file +{"version":3,"names":["getEnv","defaultValue","process","env","BABEL_ENV","NODE_ENV"],"sources":["../../../src/config/helpers/environment.ts"],"sourcesContent":["export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAMA,CAACC,YAAoB,GAAG,aAAa,EAAU;EACnE,OAAOC,OAAO,CAACC,GAAG,CAACC,SAAS,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAQ,IAAIJ,YAAY;AACtE;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/index.js b/node_modules/@babel/core/lib/config/index.js index f58755f21..e250d01a1 100644 --- a/node_modules/@babel/core/lib/config/index.js +++ b/node_modules/@babel/core/lib/config/index.js @@ -38,7 +38,10 @@ const maybeErrback = runner => (argOrCallback, maybeCallback) => { callback = maybeCallback; arg = argOrCallback; } - return callback ? runner.errback(arg, callback) : runner.sync(arg); + if (!callback) { + return runner.sync(arg); + } + runner.errback(arg, callback); }; const loadPartialConfig = maybeErrback(_partial.loadPartialConfig); exports.loadPartialConfig = loadPartialConfig; @@ -58,9 +61,9 @@ const createConfigItemAsync = createConfigItemRunner.async; exports.createConfigItemAsync = createConfigItemAsync; function createConfigItem(target, options, callback) { if (callback !== undefined) { - return createConfigItemRunner.errback(target, options, callback); + createConfigItemRunner.errback(target, options, callback); } else if (typeof options === "function") { - return createConfigItemRunner.errback(target, undefined, callback); + createConfigItemRunner.errback(target, undefined, callback); } else { return createConfigItemRunner.sync(target, options); } diff --git a/node_modules/@babel/core/lib/config/index.js.map b/node_modules/@babel/core/lib/config/index.js.map index c390caeb8..d73e278da 100644 --- a/node_modules/@babel/core/lib/config/index.js.map +++ b/node_modules/@babel/core/lib/config/index.js.map @@ -1 +1 @@ -{"version":3,"names":["loadOptionsRunner","gensync","opts","config","loadFullConfig","options","createConfigItemRunner","createConfigItemImpl","maybeErrback","runner","argOrCallback","maybeCallback","arg","callback","undefined","errback","sync","loadPartialConfig","loadPartialConfigRunner","loadPartialConfigSync","loadPartialConfigAsync","async","loadOptions","loadOptionsSync","loadOptionsAsync","createConfigItemSync","createConfigItemAsync","createConfigItem","target"],"sources":["../../src/config/index.ts"],"sourcesContent":["import gensync, { type Handler, type Callback } from \"gensync\";\n\nexport type {\n ResolvedConfig,\n InputOptions,\n PluginPasses,\n Plugin,\n} from \"./full\";\n\nimport type { PluginTarget } from \"./validation/options\";\n\nimport type {\n PluginAPI as basePluginAPI,\n PresetAPI as basePresetAPI,\n} from \"./helpers/config-api\";\nexport type { PluginObject } from \"./validation/plugins\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n CallerMetadata,\n ValidatedOptions as PresetObject,\n} from \"./validation/options\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full\";\nimport { loadPartialConfig as loadPartialConfigRunner } from \"./partial\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item\";\nimport type { ConfigItem } from \"./item\";\n\nconst loadOptionsRunner = gensync(function* (\n opts: unknown,\n): Handler {\n const config = yield* loadFullConfig(opts);\n // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n return config?.options ?? null;\n});\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\n\nconst maybeErrback =\n (runner: gensync.Gensync<[Arg], Return>) =>\n (argOrCallback: Arg | Callback, maybeCallback?: Callback) => {\n let arg: Arg | undefined;\n let callback: Callback;\n if (maybeCallback === undefined && typeof argOrCallback === \"function\") {\n callback = argOrCallback as Callback;\n arg = undefined;\n } else {\n callback = maybeCallback;\n arg = argOrCallback as Arg;\n }\n return callback ? runner.errback(arg, callback) : runner.sync(arg);\n };\n\nexport const loadPartialConfig = maybeErrback(loadPartialConfigRunner);\nexport const loadPartialConfigSync = loadPartialConfigRunner.sync;\nexport const loadPartialConfigAsync = loadPartialConfigRunner.async;\n\nexport const loadOptions = maybeErrback(loadOptionsRunner);\nexport const loadOptionsSync = loadOptionsRunner.sync;\nexport const loadOptionsAsync = loadOptionsRunner.async;\n\nexport const createConfigItemSync = createConfigItemRunner.sync;\nexport const createConfigItemAsync = createConfigItemRunner.async;\nexport function createConfigItem(\n target: PluginTarget,\n options: Parameters[1],\n callback?: (err: Error, val: ConfigItem | null) => void,\n) {\n if (callback !== undefined) {\n return createConfigItemRunner.errback(target, options, callback);\n } else if (typeof options === \"function\") {\n return createConfigItemRunner.errback(target, undefined, callback);\n } else {\n return createConfigItemRunner.sync(target, options);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAyBA;AACA;AAKA;AAGA,MAAMA,iBAAiB,GAAGC,UAAO,CAA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IA,QAAQ,KAAKC,SAAS,EAAE;IAC1B,OAAOR,sBAAsB,CAACS,OAAO,CAACa,MAAM,EAAEvB,OAAO,EAAEQ,QAAQ,CAAC;EAClE,CAAC,MAAM,IAAI,OAAOR,OAAO,KAAK,UAAU,EAAE;IACxC,OAAOC,sBAAsB,CAACS,OAAO,CAACa,MAAM,EAAEd,SAAS,EAAED,QAAQ,CAAC;EACpE,CAAC,MAAM;IACL,OAAOP,sBAAsB,CAACU,IAAI,CAACY,MAAM,EAAEvB,OAAO,CAAC;EACrD;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_full","_partial","_item","loadOptionsRunner","gensync","opts","_config$options","config","loadFullConfig","options","createConfigItemRunner","createConfigItemImpl","maybeErrback","runner","argOrCallback","maybeCallback","arg","callback","undefined","sync","errback","loadPartialConfig","loadPartialConfigRunner","exports","loadPartialConfigSync","loadPartialConfigAsync","async","loadOptions","loadOptionsSync","loadOptionsAsync","createConfigItemSync","createConfigItemAsync","createConfigItem","target"],"sources":["../../src/config/index.ts"],"sourcesContent":["import gensync, { type Handler, type Callback } from \"gensync\";\n\nexport type {\n ResolvedConfig,\n InputOptions,\n PluginPasses,\n Plugin,\n} from \"./full\";\n\nimport type { PluginTarget } from \"./validation/options\";\n\nimport type {\n PluginAPI as basePluginAPI,\n PresetAPI as basePresetAPI,\n} from \"./helpers/config-api\";\nexport type { PluginObject } from \"./validation/plugins\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n CallerMetadata,\n ValidatedOptions as PresetObject,\n} from \"./validation/options\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full\";\nimport { loadPartialConfig as loadPartialConfigRunner } from \"./partial\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item\";\nimport type { ConfigItem } from \"./item\";\n\nconst loadOptionsRunner = gensync(function* (\n opts: unknown,\n): Handler {\n const config = yield* loadFullConfig(opts);\n // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n return config?.options ?? null;\n});\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\n\nconst maybeErrback =\n (runner: gensync.Gensync<[Arg], Return>) =>\n (argOrCallback: Arg | Callback, maybeCallback?: Callback) => {\n let arg: Arg | undefined;\n let callback: Callback;\n if (maybeCallback === undefined && typeof argOrCallback === \"function\") {\n callback = argOrCallback as Callback;\n arg = undefined;\n } else {\n callback = maybeCallback;\n arg = argOrCallback as Arg;\n }\n if (!callback) {\n return runner.sync(arg);\n }\n runner.errback(arg, callback);\n };\n\nexport const loadPartialConfig = maybeErrback(loadPartialConfigRunner);\nexport const loadPartialConfigSync = loadPartialConfigRunner.sync;\nexport const loadPartialConfigAsync = loadPartialConfigRunner.async;\n\nexport const loadOptions = maybeErrback(loadOptionsRunner);\nexport const loadOptionsSync = loadOptionsRunner.sync;\nexport const loadOptionsAsync = loadOptionsRunner.async;\n\nexport const createConfigItemSync = createConfigItemRunner.sync;\nexport const createConfigItemAsync = createConfigItemRunner.async;\nexport function createConfigItem(\n target: PluginTarget,\n options: Parameters[1],\n callback?: (err: Error, val: ConfigItem | null) => void,\n) {\n if (callback !== undefined) {\n createConfigItemRunner.errback(target, options, callback);\n } else if (typeof options === \"function\") {\n createConfigItemRunner.errback(target, undefined, callback);\n } else {\n return createConfigItemRunner.sync(target, options);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAyBA,IAAAE,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AAGA,MAAMI,iBAAiB,GAA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AgB,GAAG1B,iBAAiB,CAACuB,KAAK;AAACH,OAAA,CAAAM,gBAAA,GAAAA,gBAAA;AAEjD,MAAMC,oBAAoB,GAAGpB,sBAAsB,CAACS,IAAI;AAACI,OAAA,CAAAO,oBAAA,GAAAA,oBAAA;AACzD,MAAMC,qBAAqB,GAAGrB,sBAAsB,CAACgB,KAAK;AAACH,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA;AAC3D,SAASC,gBAAgBA,CAC9BC,MAAoB,EACpBxB,OAAmD,EACnDQ,QAAuD,EACvD;EACA,IAAIA,QAAQ,KAAKC,SAAS,EAAE;IAC1BR,sBAAsB,CAACU,OAAO,CAACa,MAAM,EAAExB,OAAO,EAAEQ,QAAQ,CAAC;EAC3D,CAAC,MAAM,IAAI,OAAOR,OAAO,KAAK,UAAU,EAAE;IACxCC,sBAAsB,CAACU,OAAO,CAACa,MAAM,EAAEf,SAAS,EAAED,QAAQ,CAAC;EAC7D,CAAC,MAAM;IACL,OAAOP,sBAAsB,CAACS,IAAI,CAACc,MAAM,EAAExB,OAAO,CAAC;EACrD;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/item.js.map b/node_modules/@babel/core/lib/config/item.js.map index 4d5680766..fbb3610f6 100644 --- a/node_modules/@babel/core/lib/config/item.js.map +++ b/node_modules/@babel/core/lib/config/item.js.map @@ -1 +1 @@ -{"version":3,"names":["createItemFromDescriptor","desc","ConfigItem","createConfigItem","value","dirname","type","descriptor","createDescriptor","path","resolve","alias","CONFIG_ITEM_BRAND","Symbol","for","getItemDescriptor","item","_descriptor","undefined","constructor","options","name","file","Object","defineProperty","enumerable","request","resolved","freeze","prototype"],"sources":["../../src/config/item.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport type { PluginTarget, PluginOptions } from \"./validation/options\";\n\nimport path from \"path\";\nimport { createDescriptor } from \"./config-descriptors\";\n\nimport type { UnloadedDescriptor } from \"./config-descriptors\";\n\nexport function createItemFromDescriptor(desc: UnloadedDescriptor): ConfigItem {\n return new ConfigItem(desc);\n}\n\n/**\n * Create a config item using the same value format used in Babel's config\n * files. Items returned from this function should be cached by the caller\n * ideally, as recreating the config item will mean re-resolving the item\n * and re-evaluating the plugin/preset function.\n */\nexport function* createConfigItem(\n value:\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void],\n {\n dirname = \".\",\n type,\n }: {\n dirname?: string;\n type?: \"preset\" | \"plugin\";\n } = {},\n): Handler {\n const descriptor = yield* createDescriptor(value, path.resolve(dirname), {\n type,\n alias: \"programmatic item\",\n });\n\n return createItemFromDescriptor(descriptor);\n}\n\nconst CONFIG_ITEM_BRAND = Symbol.for(\"@babel/core@7 - ConfigItem\");\n\nexport function getItemDescriptor(item: unknown): UnloadedDescriptor | void {\n if ((item as any)?.[CONFIG_ITEM_BRAND]) {\n return (item as ConfigItem)._descriptor;\n }\n\n return undefined;\n}\n\nexport type { ConfigItem };\n\n/**\n * A public representation of a plugin/preset that will _eventually_ be load.\n * Users can use this to interact with the results of a loaded Babel\n * configuration.\n *\n * Any changes to public properties of this class should be considered a\n * breaking change to Babel's API.\n */\nclass ConfigItem {\n /**\n * The private underlying descriptor that Babel actually cares about.\n * If you access this, you are a bad person.\n */\n _descriptor: UnloadedDescriptor;\n\n // TODO(Babel 8): Check if this symbol needs to be updated\n /**\n * Used to detect ConfigItem instances from other Babel instances.\n */\n [CONFIG_ITEM_BRAND] = true;\n\n /**\n * The resolved value of the item itself.\n */\n value: {} | Function;\n\n /**\n * The options, if any, that were passed to the item.\n * Mutating this will lead to undefined behavior.\n *\n * \"false\" means that this item has been disabled.\n */\n options: {} | void | false;\n\n /**\n * The directory that the options for this item are relative to.\n */\n dirname: string;\n\n /**\n * Get the name of the plugin, if the user gave it one.\n */\n name: string | void;\n\n /**\n * Data about the file that the item was loaded from, if Babel knows it.\n */\n file: {\n // The requested path, e.g. \"@babel/env\".\n request: string;\n // The resolved absolute path of the file.\n resolved: string;\n } | void;\n\n constructor(descriptor: UnloadedDescriptor) {\n // Make people less likely to stumble onto this if they are exploring\n // programmatically, and also make sure that if people happen to\n // pass the item through JSON.stringify, it doesn't show up.\n this._descriptor = descriptor;\n Object.defineProperty(this, \"_descriptor\", { enumerable: false });\n\n Object.defineProperty(this, CONFIG_ITEM_BRAND, { enumerable: false });\n\n this.value = this._descriptor.value;\n this.options = this._descriptor.options;\n this.dirname = this._descriptor.dirname;\n this.name = this._descriptor.name;\n this.file = this._descriptor.file\n ? {\n request: this._descriptor.file.request,\n resolved: this._descriptor.file.resolved,\n }\n : undefined;\n\n // Freeze the object to make it clear that people shouldn't expect mutating\n // this object to do anything. A new item should be created if they want\n // to change something.\n Object.freeze(this);\n }\n}\n\nObject.freeze(ConfigItem.prototype);\n"],"mappings":";;;;;;;;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAIO,SAASA,wBAAwB,CAACC,IAAwB,EAAc;EAC7E,OAAO,IAAIC,UAAU,CAACD,IAAI,CAAC;AAC7B;AAQO,UAAUE,gBAAgB,CAC/BC,KAGgD,EAChD;EACEC,OAAO,GAAG,GAAG;EACbC;AAIF,CAAC,GAAG,CAAC,CAAC,EACe;EACrB,MAAMC,UAAU,GAAG,OAAO,IAAAC,mCAAgB,EAACJ,KAAK,EAAEK,OAAI,CAACC,OAAO,CAACL,OAAO,CAAC,EAAE;IACvEC,IAAI;IACJK,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,OAAOX,wBAAwB,CAACO,UAAU,CAAC;AAC7C;AAEA,MAAMK,iBAAiB,GAAGC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC;AAE3D,SAASC,iBAAiB,CAACC,IAAa,EAA6B;EAC1E,IAAKA,IAAI,YAAJA,IAAI,CAAWJ,iBAAiB,CAAC,EAAE;IACtC,OAAQI,IAAI,CAAgBC,WAAW;EACzC;EAEA,OAAOC,SAAS;AAClB;AAYA,MAAMhB,UAAU,CAAC;EA8CfiB,WAAW,CAACZ,UAA8B,EAAE;IAAA,KAzC5CU,WAAW;IAAA,KAMVL,iBAAiB,IAAI,IAAI;IAAA,KAK1BR,KAAK;IAAA,KAQLgB,OAAO;IAAA,KAKPf,OAAO;IAAA,KAKPgB,IAAI;IAAA,KAKJC,IAAI;IAWF,IAAI,CAACL,WAAW,GAAGV,UAAU;IAC7BgB,MAAM,CAACC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;MAAEC,UAAU,EAAE;IAAM,CAAC,CAAC;IAEjEF,MAAM,CAACC,cAAc,CAAC,IAAI,EAAEZ,iBAAiB,EAAE;MAAEa,UAAU,EAAE;IAAM,CAAC,CAAC;IAErE,IAAI,CAACrB,KAAK,GAAG,IAAI,CAACa,WAAW,CAACb,KAAK;IACnC,IAAI,CAACgB,OAAO,GAAG,IAAI,CAACH,WAAW,CAACG,OAAO;IACvC,IAAI,CAACf,OAAO,GAAG,IAAI,CAACY,WAAW,CAACZ,OAAO;IACvC,IAAI,CAACgB,IAAI,GAAG,IAAI,CAACJ,WAAW,CAACI,IAAI;IACjC,IAAI,CAACC,IAAI,GAAG,IAAI,CAACL,WAAW,CAACK,IAAI,GAC7B;MACEI,OAAO,EAAE,IAAI,CAACT,WAAW,CAACK,IAAI,CAACI,OAAO;MACtCC,QAAQ,EAAE,IAAI,CAACV,WAAW,CAACK,IAAI,CAACK;IAClC,CAAC,GACDT,SAAS;IAKbK,MAAM,CAACK,MAAM,CAAC,IAAI,CAAC;EACrB;AACF;AAEAL,MAAM,CAACK,MAAM,CAAC1B,UAAU,CAAC2B,SAAS,CAAC;AAAC"} \ No newline at end of file +{"version":3,"names":["_path","data","require","_configDescriptors","createItemFromDescriptor","desc","ConfigItem","createConfigItem","value","dirname","type","descriptor","createDescriptor","path","resolve","alias","CONFIG_ITEM_BRAND","Symbol","for","getItemDescriptor","item","_descriptor","undefined","constructor","options","name","file","Object","defineProperty","enumerable","request","resolved","freeze","prototype"],"sources":["../../src/config/item.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport type { PluginTarget, PluginOptions } from \"./validation/options\";\n\nimport path from \"path\";\nimport { createDescriptor } from \"./config-descriptors\";\n\nimport type { UnloadedDescriptor } from \"./config-descriptors\";\n\nexport function createItemFromDescriptor(desc: UnloadedDescriptor): ConfigItem {\n return new ConfigItem(desc);\n}\n\n/**\n * Create a config item using the same value format used in Babel's config\n * files. Items returned from this function should be cached by the caller\n * ideally, as recreating the config item will mean re-resolving the item\n * and re-evaluating the plugin/preset function.\n */\nexport function* createConfigItem(\n value:\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void],\n {\n dirname = \".\",\n type,\n }: {\n dirname?: string;\n type?: \"preset\" | \"plugin\";\n } = {},\n): Handler {\n const descriptor = yield* createDescriptor(value, path.resolve(dirname), {\n type,\n alias: \"programmatic item\",\n });\n\n return createItemFromDescriptor(descriptor);\n}\n\nconst CONFIG_ITEM_BRAND = Symbol.for(\"@babel/core@7 - ConfigItem\");\n\nexport function getItemDescriptor(item: unknown): UnloadedDescriptor | void {\n if ((item as any)?.[CONFIG_ITEM_BRAND]) {\n return (item as ConfigItem)._descriptor;\n }\n\n return undefined;\n}\n\nexport type { ConfigItem };\n\n/**\n * A public representation of a plugin/preset that will _eventually_ be load.\n * Users can use this to interact with the results of a loaded Babel\n * configuration.\n *\n * Any changes to public properties of this class should be considered a\n * breaking change to Babel's API.\n */\nclass ConfigItem {\n /**\n * The private underlying descriptor that Babel actually cares about.\n * If you access this, you are a bad person.\n */\n _descriptor: UnloadedDescriptor;\n\n // TODO(Babel 8): Check if this symbol needs to be updated\n /**\n * Used to detect ConfigItem instances from other Babel instances.\n */\n [CONFIG_ITEM_BRAND] = true;\n\n /**\n * The resolved value of the item itself.\n */\n value: {} | Function;\n\n /**\n * The options, if any, that were passed to the item.\n * Mutating this will lead to undefined behavior.\n *\n * \"false\" means that this item has been disabled.\n */\n options: {} | void | false;\n\n /**\n * The directory that the options for this item are relative to.\n */\n dirname: string;\n\n /**\n * Get the name of the plugin, if the user gave it one.\n */\n name: string | void;\n\n /**\n * Data about the file that the item was loaded from, if Babel knows it.\n */\n file: {\n // The requested path, e.g. \"@babel/env\".\n request: string;\n // The resolved absolute path of the file.\n resolved: string;\n } | void;\n\n constructor(descriptor: UnloadedDescriptor) {\n // Make people less likely to stumble onto this if they are exploring\n // programmatically, and also make sure that if people happen to\n // pass the item through JSON.stringify, it doesn't show up.\n this._descriptor = descriptor;\n Object.defineProperty(this, \"_descriptor\", { enumerable: false });\n\n Object.defineProperty(this, CONFIG_ITEM_BRAND, { enumerable: false });\n\n this.value = this._descriptor.value;\n this.options = this._descriptor.options;\n this.dirname = this._descriptor.dirname;\n this.name = this._descriptor.name;\n this.file = this._descriptor.file\n ? {\n request: this._descriptor.file.request,\n resolved: this._descriptor.file.resolved,\n }\n : undefined;\n\n // Freeze the object to make it clear that people shouldn't expect mutating\n // this object to do anything. A new item should be created if they want\n // to change something.\n Object.freeze(this);\n }\n}\n\nObject.freeze(ConfigItem.prototype);\n"],"mappings":";;;;;;;;AAGA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,kBAAA,GAAAD,OAAA;AAIO,SAASE,wBAAwBA,CAACC,IAAwB,EAAc;EAC7E,OAAO,IAAIC,UAAU,CAACD,IAAI,CAAC;AAC7B;AAQO,UAAUE,gBAAgBA,CAC/BC,KAGgD,EAChD;EACEC,OAAO,GAAG,GAAG;EACbC;AAIF,CAAC,GAAG,CAAC,CAAC,EACe;EACrB,MAAMC,UAAU,GAAG,OAAO,IAAAC,mCAAgB,EAACJ,KAAK,EAAEK,OAAI,CAACC,OAAO,CAACL,OAAO,CAAC,EAAE;IACvEC,IAAI;IACJK,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,OAAOX,wBAAwB,CAACO,UAAU,CAAC;AAC7C;AAEA,MAAMK,iBAAiB,G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;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/partial.js.map b/node_modules/@babel/core/lib/config/partial.js.map index ab853cb1a..58ab444f3 100644 --- a/node_modules/@babel/core/lib/config/partial.js.map +++ b/node_modules/@babel/core/lib/config/partial.js.map @@ -1 +1 @@ -{"version":3,"names":["resolveRootMode","rootDir","rootMode","upwardRootDir","findConfigUpwards","Object","assign","Error","ROOT_CONFIG_FILENAMES","join","code","dirname","loadPrivatePartialConfig","inputOpts","Array","isArray","args","validate","envName","getEnv","cwd","root","caller","cloneInputAst","absoluteCwd","path","resolve","absoluteRootDir","filename","undefined","showConfigPath","resolveShowConfigPath","context","showConfig","configChain","buildRootChain","merged","assumptions","options","forEach","opts","mergeOptions","targets","resolveTargets","babelrc","configFile","browserslistConfigFile","passPerPreset","plugins","map","descriptor","createItemFromDescriptor","presets","fileHandling","ignore","config","files","loadPartialConfig","gensync","showIgnoredFiles","result","item","value","Plugin","PartialConfig","filepath","constructor","babelignore","freeze","hasFilesystemConfig","prototype"],"sources":["../../src/config/partial.ts"],"sourcesContent":["import path from \"path\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin\";\nimport { mergeOptions } from \"./util\";\nimport { createItemFromDescriptor } from \"./item\";\nimport { buildRootChain } from \"./config-chain\";\nimport type { ConfigContext, FileHandling } from \"./config-chain\";\nimport { getEnv } from \"./helpers/environment\";\nimport { validate } from \"./validation/options\";\n\nimport type {\n ValidatedOptions,\n NormalizedOptions,\n RootMode,\n} from \"./validation/options\";\n\nimport {\n findConfigUpwards,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./files\";\nimport type { ConfigFile, IgnoreFile } from \"./files\";\nimport { resolveTargets } from \"./resolve-targets\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n switch (rootMode) {\n case \"root\":\n return rootDir;\n\n case \"upward-optional\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n return upwardRootDir === null ? rootDir : upwardRootDir;\n }\n\n case \"upward\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n if (upwardRootDir !== null) return upwardRootDir;\n\n throw Object.assign(\n new Error(\n `Babel was run with rootMode:\"upward\" but a root could not ` +\n `be found when searching upward from \"${rootDir}\".\\n` +\n `One of the following config files must be in the directory tree: ` +\n `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n ) as any,\n {\n code: \"BABEL_ROOT_NOT_FOUND\",\n dirname: rootDir,\n },\n );\n }\n default:\n throw new Error(`Assertion failure - unknown rootMode value.`);\n }\n}\n\ntype PrivPartialConfig = {\n options: NormalizedOptions;\n context: ConfigContext;\n fileHandling: FileHandling;\n ignore: IgnoreFile | void;\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n files: Set;\n};\n\nexport default function* loadPrivatePartialConfig(\n inputOpts: unknown,\n): Handler {\n if (\n inputOpts != null &&\n (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n ) {\n throw new Error(\"Babel options must be an object, null, or undefined\");\n }\n\n const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n const {\n envName = getEnv(),\n cwd = \".\",\n root: rootDir = \".\",\n rootMode = \"root\",\n caller,\n cloneInputAst = true,\n } = args;\n const absoluteCwd = path.resolve(cwd);\n const absoluteRootDir = resolveRootMode(\n path.resolve(absoluteCwd, rootDir),\n rootMode,\n );\n\n const filename =\n typeof args.filename === \"string\"\n ? path.resolve(cwd, args.filename)\n : undefined;\n\n const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n const context: ConfigContext = {\n filename,\n cwd: absoluteCwd,\n root: absoluteRootDir,\n envName,\n caller,\n showConfig: showConfigPath === filename,\n };\n\n const configChain = yield* buildRootChain(args, context);\n if (!configChain) return null;\n\n const merged: ValidatedOptions = {\n assumptions: {},\n };\n configChain.options.forEach(opts => {\n mergeOptions(merged as any, opts);\n });\n\n const options: NormalizedOptions = {\n ...merged,\n targets: resolveTargets(merged, absoluteRootDir),\n\n // Tack the passes onto the object itself so that, if this object is\n // passed back to Babel a second time, it will be in the right structure\n // to not change behavior.\n cloneInputAst,\n babelrc: false,\n configFile: false,\n browserslistConfigFile: false,\n passPerPreset: false,\n envName: context.envName,\n cwd: context.cwd,\n root: context.root,\n rootMode: \"root\",\n filename:\n typeof context.filename === \"string\" ? context.filename : undefined,\n\n plugins: configChain.plugins.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n presets: configChain.presets.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n };\n\n return {\n options,\n context,\n fileHandling: configChain.fileHandling,\n ignore: configChain.ignore,\n babelrc: configChain.babelrc,\n config: configChain.config,\n files: configChain.files,\n };\n}\n\ntype LoadPartialConfigOpts = {\n showIgnoredFiles?: boolean;\n};\n\nexport const loadPartialConfig = gensync(function* (\n opts?: LoadPartialConfigOpts,\n): Handler {\n let showIgnoredFiles = false;\n // We only extract showIgnoredFiles if opts is an object, so that\n // loadPrivatePartialConfig can throw the appropriate error if it's not.\n if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n ({ showIgnoredFiles, ...opts } = opts);\n }\n\n const result: PrivPartialConfig | undefined | null =\n yield* loadPrivatePartialConfig(opts);\n if (!result) return null;\n\n const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n return null;\n }\n\n (options.plugins || []).forEach(item => {\n // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n if (item.value instanceof Plugin) {\n throw new Error(\n \"Passing cached plugin instances is not supported in \" +\n \"babel.loadPartialConfig()\",\n );\n }\n });\n\n return new PartialConfig(\n options,\n babelrc ? babelrc.filepath : undefined,\n ignore ? ignore.filepath : undefined,\n config ? config.filepath : undefined,\n fileHandling,\n files,\n );\n});\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n /**\n * These properties are public, so any changes to them should be considered\n * a breaking change to Babel's API.\n */\n options: NormalizedOptions;\n babelrc: string | void;\n babelignore: string | void;\n config: string | void;\n fileHandling: FileHandling;\n files: Set;\n\n constructor(\n options: NormalizedOptions,\n babelrc: string | void,\n ignore: string | void,\n config: string | void,\n fileHandling: FileHandling,\n files: Set,\n ) {\n this.options = options;\n this.babelignore = ignore;\n this.babelrc = babelrc;\n this.config = config;\n this.fileHandling = fileHandling;\n this.files = files;\n\n // Freeze since this is a public API and it should be extremely obvious that\n // reassigning properties on here does nothing.\n Object.freeze(this);\n }\n\n /**\n * Returns true if there is a config file in the filesystem for this config.\n */\n hasFilesystemConfig(): boolean {\n return this.babelrc !== undefined || this.config !== undefined;\n }\n}\nObject.freeze(PartialConfig.prototype);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAQA;AAMA;AAAmD;AAAA;AAEnD,SAASA,eAAe,CAACC,OAAe,EAAEC,QAAkB,EAAU;EACpE,QAAQA,QAAQ;IACd,KAAK,MAAM;MACT,OAAOD,OAAO;IAEhB,KAAK,iBAAiB;MAAE;QACtB,MAAME,aAAa,GAAG,IAAAC,wBAAiB,EAACH,OAAO,CAAC;QAChD,OAAOE,aAAa,KAAK,IAAI,GAAGF,OAAO,GAAGE,aAAa;MACzD;IAEA,KAAK,QAAQ;MAAE;QACb,MAAMA,aAAa,GAAG,IAAAC,wBAAiB,EAACH,OAAO,CAAC;QAChD,IAAIE,aAAa,KAAK,IAAI,EAAE,OAAOA,aAAa;QAEhD,MAAME,MAAM,CAACC,MAAM,CACjB,IAAIC,KAAK,CACN,4DAA2D,GACzD,wCAAuCN,OAAQ,MAAK,GACpD,mEAAkE,GAClE,IAAGO,4BAAqB,CAACC,IAAI,CAAC,IAAI,CAAE,IAAG,CAC3C,EACD;UACEC,IAAI,EAAE,sBAAsB;UAC5BC,OAAO,EAAEV;QACX,CAAC,CACF;MACH;IACA;MACE,MAAM,IAAIM,KAAK,CAAE,6CAA4C,CAAC;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AO;IACtB,IAAI,CAAC6B,WAAW,GAAGb,MAAM;IACzB,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACW,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACF,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACG,KAAK,GAAGA,KAAK;IAIlBnD,MAAM,CAAC+D,MAAM,CAAC,IAAI,CAAC;EACrB;EAKAC,mBAAmB,GAAY;IAC7B,OAAO,IAAI,CAACzB,OAAO,KAAKf,SAAS,IAAI,IAAI,CAAC0B,MAAM,KAAK1B,SAAS;EAChE;AACF;AACAxB,MAAM,CAAC+D,MAAM,CAACJ,aAAa,CAACM,SAAS,CAAC;AAAC"} \ No newline at end of file +{"version":3,"names":["_path","data","require","_gensync","_plugin","_util","_item","_configChain","_environment","_options","_files","_resolveTargets","_excluded","_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","Object","keys","key","i","length","indexOf","resolveRootMode","rootDir","rootMode","upwardRootDir","findConfigUpwards","assign","Error","ROOT_CONFIG_FILENAMES","join","code","dirname","loadPrivatePartialConfig","inputOpts","Array","isArray","args","validate","envName","getEnv","cwd","root","caller","cloneInputAst","absoluteCwd","path","resolve","absoluteRootDir","filename","undefined","showConfigPath","resolveShowConfigPath","context","showConfig","configChain","buildRootChain","merged","assumptions","options","forEach","opts","mergeOptions","targets","resolveTargets","babelrc","configFile","browserslistConfigFile","passPerPreset","plugins","map","descriptor","createItemFromDescriptor","presets","fileHandling","ignore","config","files","loadPartialConfig","gensync","showIgnoredFiles","_opts","result","item","value","Plugin","PartialConfig","filepath","exports","constructor","babelignore","freeze","hasFilesystemConfig","prototype"],"sources":["../../src/config/partial.ts"],"sourcesContent":["import path from \"path\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin\";\nimport { mergeOptions } from \"./util\";\nimport { createItemFromDescriptor } from \"./item\";\nimport { buildRootChain } from \"./config-chain\";\nimport type { ConfigContext, FileHandling } from \"./config-chain\";\nimport { getEnv } from \"./helpers/environment\";\nimport { validate } from \"./validation/options\";\n\nimport type {\n ValidatedOptions,\n NormalizedOptions,\n RootMode,\n} from \"./validation/options\";\n\nimport {\n findConfigUpwards,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./files\";\nimport type { ConfigFile, IgnoreFile } from \"./files\";\nimport { resolveTargets } from \"./resolve-targets\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n switch (rootMode) {\n case \"root\":\n return rootDir;\n\n case \"upward-optional\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n return upwardRootDir === null ? rootDir : upwardRootDir;\n }\n\n case \"upward\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n if (upwardRootDir !== null) return upwardRootDir;\n\n throw Object.assign(\n new Error(\n `Babel was run with rootMode:\"upward\" but a root could not ` +\n `be found when searching upward from \"${rootDir}\".\\n` +\n `One of the following config files must be in the directory tree: ` +\n `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n ) as any,\n {\n code: \"BABEL_ROOT_NOT_FOUND\",\n dirname: rootDir,\n },\n );\n }\n default:\n throw new Error(`Assertion failure - unknown rootMode value.`);\n }\n}\n\ntype PrivPartialConfig = {\n options: NormalizedOptions;\n context: ConfigContext;\n fileHandling: FileHandling;\n ignore: IgnoreFile | void;\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n files: Set;\n};\n\nexport default function* loadPrivatePartialConfig(\n inputOpts: unknown,\n): Handler {\n if (\n inputOpts != null &&\n (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n ) {\n throw new Error(\"Babel options must be an object, null, or undefined\");\n }\n\n const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n const {\n envName = getEnv(),\n cwd = \".\",\n root: rootDir = \".\",\n rootMode = \"root\",\n caller,\n cloneInputAst = true,\n } = args;\n const absoluteCwd = path.resolve(cwd);\n const absoluteRootDir = resolveRootMode(\n path.resolve(absoluteCwd, rootDir),\n rootMode,\n );\n\n const filename =\n typeof args.filename === \"string\"\n ? path.resolve(cwd, args.filename)\n : undefined;\n\n const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n const context: ConfigContext = {\n filename,\n cwd: absoluteCwd,\n root: absoluteRootDir,\n envName,\n caller,\n showConfig: showConfigPath === filename,\n };\n\n const configChain = yield* buildRootChain(args, context);\n if (!configChain) return null;\n\n const merged: ValidatedOptions = {\n assumptions: {},\n };\n configChain.options.forEach(opts => {\n mergeOptions(merged as any, opts);\n });\n\n const options: NormalizedOptions = {\n ...merged,\n targets: resolveTargets(merged, absoluteRootDir),\n\n // Tack the passes onto the object itself so that, if this object is\n // passed back to Babel a second time, it will be in the right structure\n // to not change behavior.\n cloneInputAst,\n babelrc: false,\n configFile: false,\n browserslistConfigFile: false,\n passPerPreset: false,\n envName: context.envName,\n cwd: context.cwd,\n root: context.root,\n rootMode: \"root\",\n filename:\n typeof context.filename === \"string\" ? context.filename : undefined,\n\n plugins: configChain.plugins.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n presets: configChain.presets.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n };\n\n return {\n options,\n context,\n fileHandling: configChain.fileHandling,\n ignore: configChain.ignore,\n babelrc: configChain.babelrc,\n config: configChain.config,\n files: configChain.files,\n };\n}\n\ntype LoadPartialConfigOpts = {\n showIgnoredFiles?: boolean;\n};\n\nexport const loadPartialConfig = gensync(function* (\n opts?: LoadPartialConfigOpts,\n): Handler {\n let showIgnoredFiles = false;\n // We only extract showIgnoredFiles if opts is an object, so that\n // loadPrivatePartialConfig can throw the appropriate error if it's not.\n if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n ({ showIgnoredFiles, ...opts } = opts);\n }\n\n const result: PrivPartialConfig | undefined | null =\n yield* loadPrivatePartialConfig(opts);\n if (!result) return null;\n\n const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n return null;\n }\n\n (options.plugins || []).forEach(item => {\n // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n if (item.value instanceof Plugin) {\n throw new Error(\n \"Passing cached plugin instances is not supported in \" +\n \"babel.loadPartialConfig()\",\n );\n }\n });\n\n return new PartialConfig(\n options,\n babelrc ? babelrc.filepath : undefined,\n ignore ? ignore.filepath : undefined,\n config ? config.filepath : undefined,\n fileHandling,\n files,\n );\n});\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n /**\n * These properties are public, so any changes to them should be considered\n * a breaking change to Babel's API.\n */\n options: NormalizedOptions;\n babelrc: string | void;\n babelignore: string | void;\n config: string | void;\n fileHandling: FileHandling;\n files: Set;\n\n constructor(\n options: NormalizedOptions,\n babelrc: string | void,\n ignore: string | void,\n config: string | void,\n fileHandling: FileHandling,\n files: Set,\n ) {\n this.options = options;\n this.babelignore = ignore;\n this.babelrc = babelrc;\n this.config = config;\n this.fileHandling = fileHandling;\n this.files = files;\n\n // Freeze since this is a public API and it should be extremely obvious that\n // reassigning properties on here does nothing.\n Object.freeze(this);\n }\n\n /**\n * Returns true if there is a config file in the filesystem for this config.\n */\n hasFilesystemConfig(): boolean {\n return this.babelrc !== undefined || this.config !== undefined;\n }\n}\nObject.freeze(PartialConfig.prototype);\n"],"mappings":";;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAEA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP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AAA,KACZG,KAAK;IAUH,IAAI,CAAClB,OAAO,GAAGA,OAAO;IACtB,IAAI,CAAC+B,WAAW,GAAGf,MAAM;IACzB,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACW,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACF,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACG,KAAK,GAAGA,KAAK;IAIlB7D,MAAM,CAAC2E,MAAM,CAAC,IAAI,CAAC;EACrB;EAKAC,mBAAmBA,CAAA,EAAY;IAC7B,OAAO,IAAI,CAAC3B,OAAO,KAAKf,SAAS,IAAI,IAAI,CAAC0B,MAAM,KAAK1B,SAAS;EAChE;AACF;AACAlC,MAAM,CAAC2E,MAAM,CAACL,aAAa,CAACO,SAAS,CAAC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js.map b/node_modules/@babel/core/lib/config/pattern-to-regex.js.map index 4f1488926..4405f5b96 100644 --- a/node_modules/@babel/core/lib/config/pattern-to-regex.js.map +++ b/node_modules/@babel/core/lib/config/pattern-to-regex.js.map @@ -1 +1 @@ -{"version":3,"names":["sep","path","endSep","substitution","starPat","starPatLast","starStarPat","starStarPatLast","escapeRegExp","string","replace","pathToPattern","pattern","dirname","parts","resolve","split","RegExp","map","part","i","last","length","indexOf","slice","join"],"sources":["../../src/config/pattern-to-regex.ts"],"sourcesContent":["import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,GAAG,GAAI,KAAIC,OAAI,CAACD,GAAI,EAAC;AAC3B,MAAME,MAAM,GAAI,MAAKF,GAAI,KAAI;AAE7B,MAAMG,YAAY,GAAI,KAAIH,GAAI,IAAG;AAEjC,MAAMI,OAAO,GAAI,MAAKD,YAAa,GAAEH,GAAI,GAAE;AAC3C,MAAMK,WAAW,GAAI,MAAKF,YAAa,GAAED,MAAO,GAAE;AAElD,MAAMI,WAAW,GAAI,GAAEF,OAAQ,IAAG;AAClC,MAAMG,eAAe,GAAI,GAAEH,OAAQ,KAAIC,WAAY,GAAE;AAErD,SAASG,YAAY,CAACC,MAAc,EAAE;EACpC,OAAOA,MAAM,CAACC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACtD;AAOe,SAASC,aAAa,CACnCC,OAAe,EACfC,OAAe,EACP;EACR,MAAMC,KAAK,GAAGb,OAAI,CAACc,OAAO,CAACF,OAAO,EAAED,OAAO,CAAC,CAACI,KAAK,CAACf,OAAI,CAACD,GAAG,CAAC;EAE5D,OAAO,IAAIiB,MAAM,CACf,CACE,GAAG,EACH,GAAGH,KAAK,CAACI,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK;IACxB,MAAMC,IAAI,GAAGD,CAAC,KAAKN,KAAK,CAACQ,MAAM,GAAG,CAAC;IAGnC,IAAIH,IAAI,KAAK,IAAI,EAAE,OAAOE,IAAI,GAAGd,eAAe,GAAGD,WAAW;IAG9D,IAAIa,IAAI,KAAK,GAAG,EAAE,OAAOE,IAAI,GAAGhB,WAAW,GAAGD,OAAO;IAGrD,IAAIe,IAAI,CAACI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;MAC5B,OACEpB,YAAY,GAAGK,YAAY,CAACW,IAAI,CAACK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIH,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;IAEtE;IAGA,OAAOQ,YAAY,CAACW,IAAI,CAAC,IAAIE,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;EACnD,CAAC,CAAC,CACH,CAACyB,IAAI,CAAC,EAAE,CAAC,CACX;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["_path","data","require","sep","path","endSep","substitution","starPat","starPatLast","starStarPat","starStarPatLast","escapeRegExp","string","replace","pathToPattern","pattern","dirname","parts","resolve","split","RegExp","map","part","i","last","length","indexOf","slice","join"],"sources":["../../src/config/pattern-to-regex.ts"],"sourcesContent":["import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAME,GAAG,GAAI,KAAIC,OAAI,CAACD,GAAI,EAAC;AAC3B,MAAME,MAAM,GAAI,MAAKF,GAAI,KAAI;AAE7B,MAAMG,YAAY,GAAI,KAAIH,GAAI,IAAG;AAEjC,MAAMI,OAAO,GAAI,MAAKD,YAAa,GAAEH,GAAI,GAAE;AAC3C,MAAMK,WAAW,GAAI,MAAKF,YAAa,GAAED,MAAO,GAAE;AAElD,MAAMI,WAAW,GAAI,GAAEF,OAAQ,IAAG;AAClC,MAAMG,eAAe,GAAI,GAAEH,OAAQ,KAAIC,WAAY,GAAE;AAErD,SAASG,YAAYA,CAACC,MAAc,EAAE;EACpC,OAAOA,MAAM,CAACC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACtD;AAOe,SAASC,aAAaA,CACnCC,OAAe,EACfC,OAAe,EACP;EACR,MAAMC,KAAK,GAAGb,OAAI,CAACc,OAAO,CAACF,OAAO,EAAED,OAAO,CAAC,CAACI,KAAK,CAACf,OAAI,CAACD,GAAG,CAAC;EAE5D,OAAO,IAAIiB,MAAM,CACf,CACE,GAAG,EACH,GAAGH,KAAK,CAACI,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK;IACxB,MAAMC,IAAI,GAAGD,CAAC,KAAKN,KAAK,CAACQ,MAAM,GAAG,CAAC;IAGnC,IAAIH,IAAI,KAAK,IAAI,EAAE,OAAOE,IAAI,GAAGd,eAAe,GAAGD,WAAW;IAG9D,IAAIa,IAAI,KAAK,GAAG,EAAE,OAAOE,IAAI,GAAGhB,WAAW,GAAGD,OAAO;IAGrD,IAAIe,IAAI,CAACI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;MAC5B,OACEpB,YAAY,GAAGK,YAAY,CAACW,IAAI,CAACK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIH,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;IAEtE;IAGA,OAAOQ,YAAY,CAACW,IAAI,CAAC,IAAIE,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;EACnD,CAAC,CAAC,CACH,CAACyB,IAAI,CAAC,EAAE,CAAC,CACX;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/plugin.js.map b/node_modules/@babel/core/lib/config/plugin.js.map index 2ad796173..32cd22355 100644 --- a/node_modules/@babel/core/lib/config/plugin.js.map +++ b/node_modules/@babel/core/lib/config/plugin.js.map @@ -1 +1 @@ -{"version":3,"names":["Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type { PluginObject } from \"./validation/plugins\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: {};\n\n externalDependencies: ReadonlyDeepArray;\n\n constructor(\n plugin: PluginObject,\n options: {},\n key?: string,\n externalDependencies: ReadonlyDeepArray = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA;AAIe,MAAMA,MAAM,CAAC;EAc1BC,WAAW,CACTC,MAAoB,EACpBC,OAAW,EACXC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAAC;AAAA"} \ No newline at end of file +{"version":3,"names":["_deepArray","require","Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name","exports","default"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type { PluginObject } from \"./validation/plugins\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: {};\n\n externalDependencies: ReadonlyDeepArray;\n\n constructor(\n plugin: PluginObject,\n options: {},\n key?: string,\n externalDependencies: ReadonlyDeepArray = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIe,MAAMC,MAAM,CAAC;EAc1BC,WAAWA,CACTC,MAAoB,EACpBC,OAAW,EACXC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAACS,OAAA,CAAAC,OAAA,GAAAf,MAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/printer.js.map b/node_modules/@babel/core/lib/config/printer.js.map index ae26f6a51..606b33c03 100644 --- a/node_modules/@babel/core/lib/config/printer.js.map +++ b/node_modules/@babel/core/lib/config/printer.js.map @@ -1 +1 @@ -{"version":3,"names":["ChainFormatter","Programmatic","Config","Formatter","title","type","callerName","filepath","loc","index","envName","optionsAndDescriptors","opt","content","options","overrides","env","pluginDescriptors","plugins","length","map","d","descriptorToConfig","presetDescriptors","presets","JSON","stringify","undefined","name","file","request","value","toString","slice","ConfigPrinter","_stack","configure","enabled","push","format","config","output","configs","gensync","all","s","join"],"sources":["../../src/config/printer.ts"],"sourcesContent":["import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: typeof ChainFormatter[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: typeof ChainFormatter[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig(\n d: UnloadedDescriptor,\n): string | {} | Array {\n let name = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: Array = [];\n configure(\n enabled: boolean,\n type: typeof ChainFormatter[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAUO,MAAMA,cAAc,GAAG;EAC5BC,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE;AACV,CAAC;AAAC;AAWF,MAAMC,SAAS,GAAG;EAChBC,KAAK,CACHC,IAAwD,EACxDC,UAA0B,EAC1BC,QAAwB,EAChB;IACR,IAAIH,KAAK,GAAG,EAAE;IACd,IAAIC,IAAI,KAAKL,cAAc,CAACC,YAAY,EAAE;MACxCG,KAAK,GAAG,sBAAsB;MAC9B,IAAIE,UAAU,EAAE;QACdF,KAAK,IAAI,QAAQ,GAAGE,UAAU;MAChC;IACF,CAAC,MAAM;MACLF,KAAK,GAAG,SAAS,GAAGG,QAAQ;IAC9B;IACA,OAAOH,KAAK;EACd,CAAC;EACDI,GAAG,CAACC,KAAqB,EAAEC,OAAuB,EAAU;IAC1D,IAAIF,GAAG,GAAG,EAAE;IACZ,IAAIC,KAAK,IAAI,IAAI,EAAE;MACjBD,GAAG,IAAK,cAAaC,KAAM,GAAE;IAC/B;IACA,IAAIC,OAAO,IAAI,IAAI,EAAE;MACnBF,GAAG,IAAK,SAAQE,OAAQ,IAAG;IAC7B;IACA,OAAOF,GAAG;EACZ,CAAC;EAED,CAACG,qBAAqB,CAACC,GAA0B,EAAE;IACjD,MAAMC,OAAO,qBAAQD,GAAG,CAACE,OAAO,CAAE;IAElC,OAAOD,OAAO,CAACE,SAAS;IACxB,OAAOF,OAAO,CAACG,GAAG;IAElB,MAAMC,iBAAiB,GAAG,CAAC,IAAI,OAAOL,GAAG,CAACM,OAAO,EAAE,CAAC,CAAC;IACrD,IAAID,iBAAiB,CAACE,MAAM,EAAE;MAC5BN,OAAO,CAACK,OAAO,GAAGD,iBAAiB,CAACG,GAAG,CAACC,CAAC,IAAIC,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,GAA2B,EAAE;EAAA;EACnCC,SAAS,CACPC,OAAgB,EAChBhC,IAAwD,EACxD;IACEC,UAAU;IACVC;EAIF,CAAC,EACD;IACA,IAAI,CAAC8B,OAAO,EAAE,OAAO,MAAM,CAAC,CAAC;IAC7B,OAAO,CACLxB,OAA8B,EAC9BJ,KAAqB,EACrBC,OAAuB,KACpB;MACH,IAAI,CAACyB,MAAM,CAACG,IAAI,CAAC;QACfjC,IAAI;QACJC,UAAU;QACVC,QAAQ;QACRM,OAAO;QACPJ,KAAK;QACLC;MACF,CAAC,CAAC;IACJ,CAAC;EACH;EACA,QAAQ6B,MAAM,CAACC,MAAuB,EAAmB;IACvD,IAAIpC,KAAK,GAAGD,SAAS,CAACC,KAAK,CACzBoC,MAAM,CAACnC,IAAI,EACXmC,MAAM,CAAClC,UAAU,EACjBkC,MAAM,CAACjC,QAAQ,CAChB;IACD,MAAMC,GAAG,GAAGL,SAAS,CAACK,GAAG,CAACgC,MAAM,CAAC/B,KAAK,EAAE+B,MAAM,CAAC9B,OAAO,CAAC;IACvD,IAAIF,GAAG,EAAEJ,KAAK,IAAK,IAAGI,GAAI,EAAC;IAC3B,MAAMK,OAAO,GAAG,OAAOV,SAAS,CAACQ,qBAAqB,CAAC6B,MAAM,CAAC3B,OAAO,CAAC;IACtE,OAAQ,GAAET,KAAM,KAAIS,OAAQ,EAAC;EAC/B;EAEA,CAAC4B,MAAM,GAAoB;IACzB,IAAI,IAAI,CAACN,MAAM,CAAChB,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;IACvC,MAAMuB,OAAO,GAAG,OAAOC,UAAO,CAACC,GAAG,CAChC,IAAI,CAACT,MAAM,CAACf,GAAG,CAACyB,CAAC,IAAIX,aAAa,CAACK,MAAM,CAACM,CAAC,CAAC,CAAC,CAC9C;IACD,OAAOH,OAAO,CAACI,IAAI,CAAC,MAAM,CAAC;EAC7B;AACF;AAAC;AAAA"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","ChainFormatter","Programmatic","Config","exports","Formatter","title","type","callerName","filepath","loc","index","envName","optionsAndDescriptors","opt","content","Object","assign","options","overrides","env","pluginDescriptors","plugins","length","map","d","descriptorToConfig","presetDescriptors","presets","JSON","stringify","undefined","_d$file","name","file","request","value","toString","slice","ConfigPrinter","constructor","_stack","configure","enabled","push","format","config","output","configs","gensync","all","s","join"],"sources":["../../src/config/printer.ts"],"sourcesContent":["import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: typeof ChainFormatter[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: typeof ChainFormatter[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig(\n d: UnloadedDescriptor,\n): string | {} | Array {\n let name = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: Array = [];\n configure(\n enabled: boolean,\n type: typeof ChainFormatter[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUO,MAAME,cAAc,GAAG;EAC5BC,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE;AACV,CAAC;AAACC,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAWF,MAAMI,SAAS,GAAG;EAChB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AAuB,KACpB;MACH,IAAI,CAAC6B,MAAM,CAACG,IAAI,CAAC;QACfrC,IAAI;QACJC,UAAU;QACVC,QAAQ;QACRM,OAAO;QACPJ,KAAK;QACLC;MACF,CAAC,CAAC;IACJ,CAAC;EACH;EACA,QAAQiC,MAAMA,CAACC,MAAuB,EAAmB;IACvD,IAAIxC,KAAK,GAAGD,SAAS,CAACC,KAAK,CACzBwC,MAAM,CAACvC,IAAI,EACXuC,MAAM,CAACtC,UAAU,EACjBsC,MAAM,CAACrC,QAAQ,CAChB;IACD,MAAMC,GAAG,GAAGL,SAAS,CAACK,GAAG,CAACoC,MAAM,CAACnC,KAAK,EAAEmC,MAAM,CAAClC,OAAO,CAAC;IACvD,IAAIF,GAAG,EAAEJ,KAAK,IAAK,IAAGI,GAAI,EAAC;IAC3B,MAAMK,OAAO,GAAG,OAAOV,SAAS,CAACQ,qBAAqB,CAACiC,MAAM,CAAC/B,OAAO,CAAC;IACtE,OAAQ,GAAET,KAAM,KAAIS,OAAQ,EAAC;EAC/B;EAEA,CAACgC,MAAMA,CAAA,EAAoB;IACzB,IAAI,IAAI,CAACN,MAAM,CAAClB,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;IACvC,MAAMyB,OAAO,GAAG,OAAOC,UAAO,CAACC,GAAG,CAChC,IAAI,CAACT,MAAM,CAACjB,GAAG,CAAC2B,CAAC,IAAIZ,aAAa,CAACM,MAAM,CAACM,CAAC,CAAC,CAAC,CAC9C;IACD,OAAOH,OAAO,CAACI,IAAI,CAAC,MAAM,CAAC;EAC7B;AACF;AAAChD,OAAA,CAAAmC,aAAA,GAAAA,aAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map b/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map index 68de3b312..bbae8a204 100644 --- a/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +++ b/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map @@ -1 +1 @@ -{"version":3,"names":["resolveBrowserslistConfigFile","browserslistConfigFile","configFilePath","undefined","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","esmodules","getTargets","ignoreBrowserslistConfig","browserslistEnv"],"sources":["../../src/config/resolve-targets-browser.ts"],"sourcesContent":["import type { ValidatedOptions } from \"./validation/options\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMO,SAASA,6BAA6B,CAE3CC,sBAA8B,EAE9BC,cAAsB,EACP;EACf,OAAOC,SAAS;AAClB;AAEO,SAASC,cAAc,CAC5BC,OAAyB,EAEzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,qBAAQD,UAAU;QAAEK,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELJ,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,OAAO,IAAAM,mCAAU,EAACL,OAAO,EAAE;IACzBM,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAEV,OAAO,CAACU;EAC3B,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file +{"version":3,"names":["_helperCompilationTargets","data","require","resolveBrowserslistConfigFile","browserslistConfigFile","configFilePath","undefined","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","getTargets","ignoreBrowserslistConfig","browserslistEnv"],"sources":["../../src/config/resolve-targets-browser.ts"],"sourcesContent":["import type { ValidatedOptions } from \"./validation/options\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AACA,SAAAA,0BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,yBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMO,SAASE,6BAA6BA,CAE3CC,sBAA8B,EAE9BC,cAAsB,EACP;EACf,OAAOC,SAAS;AAClB;AAEO,SAASC,cAAcA,CAC5BC,OAAyB,EAEzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,OAAO,IAAAQ,mCAAU,EAACP,OAAO,EAAE;IACzBQ,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAEZ,OAAO,CAACY;EAC3B,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/resolve-targets.js.map b/node_modules/@babel/core/lib/config/resolve-targets.js.map index f3059fe52..b9ffa8957 100644 --- a/node_modules/@babel/core/lib/config/resolve-targets.js.map +++ b/node_modules/@babel/core/lib/config/resolve-targets.js.map @@ -1 +1 @@ -{"version":3,"names":["resolveBrowserslistConfigFile","browserslistConfigFile","configFileDir","path","resolve","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","esmodules","configFile","ignoreBrowserslistConfig","getTargets","configPath","browserslistEnv"],"sources":["../../src/config/resolve-targets.ts"],"sourcesContent":["type browserType = typeof import(\"./resolve-targets-browser\");\ntype nodeType = typeof import(\"./resolve-targets\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({} as any as browserType as nodeType);\n\nimport type { ValidatedOptions } from \"./validation/options\";\nimport path from \"path\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n browserslistConfigFile: string,\n configFileDir: string,\n): string | undefined {\n return path.resolve(configFileDir, browserslistConfigFile);\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n const { browserslistConfigFile } = options;\n let configFile;\n let ignoreBrowserslistConfig = false;\n if (typeof browserslistConfigFile === \"string\") {\n configFile = browserslistConfigFile;\n } else {\n ignoreBrowserslistConfig = browserslistConfigFile === false;\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig,\n configFile,\n configPath: root,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAJA,CAAC,CAAC,CAAC;AAUI,SAASA,6BAA6B,CAC3CC,sBAA8B,EAC9BC,aAAqB,EACD;EACpB,OAAOC,OAAI,CAACC,OAAO,CAACF,aAAa,EAAED,sBAAsB,CAAC;AAC5D;AAEO,SAASI,cAAc,CAC5BC,OAAyB,EACzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,qBAAQD,UAAU;QAAEK,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELJ,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,MAAM;IAAEP;EAAuB,CAAC,GAAGK,OAAO;EAC1C,IAAIQ,UAAU;EACd,IAAIC,wBAAwB,GAAG,KAAK;EACpC,IAAI,OAAOd,sBAAsB,KAAK,QAAQ,EAAE;IAC9Ca,UAAU,GAAGb,sBAAsB;EACrC,CAAC,MAAM;IACLc,wBAAwB,GAAGd,sBAAsB,KAAK,KAAK;EAC7D;EAEA,OAAO,IAAAe,mCAAU,EAACP,OAAO,EAAE;IACzBM,wBAAwB;IACxBD,UAAU;IACVG,UAAU,EAAEV,IAAI;IAChBW,eAAe,EAAEZ,OAAO,CAACY;EAC3B,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file +{"version":3,"names":["_path","data","require","_helperCompilationTargets","resolveBrowserslistConfigFile","browserslistConfigFile","configFileDir","path","resolve","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","configFile","ignoreBrowserslistConfig","getTargets","configPath","browserslistEnv"],"sources":["../../src/config/resolve-targets.ts"],"sourcesContent":["type browserType = typeof import(\"./resolve-targets-browser\");\ntype nodeType = typeof import(\"./resolve-targets\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({} as any as browserType as nodeType);\n\nimport type { ValidatedOptions } from \"./validation/options\";\nimport path from \"path\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n browserslistConfigFile: string,\n configFileDir: string,\n): string | undefined {\n return path.resolve(configFileDir, browserslistConfigFile);\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n const { browserslistConfigFile } = options;\n let configFile;\n let ignoreBrowserslistConfig = false;\n if (typeof browserslistConfigFile === \"string\") {\n configFile = browserslistConfigFile;\n } else {\n ignoreBrowserslistConfig = browserslistConfigFile === false;\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig,\n configFile,\n configPath: root,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AAQA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,0BAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,yBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAJA,CAAC,CAAC,CAAC;AAUI,SAASG,6BAA6BA,CAC3CC,sBAA8B,EAC9BC,aAAqB,EACD;EACpB,OAAOC,OAAI,CAACC,OAAO,CAACF,aAAa,EAAED,sBAAsB,CAAC;AAC5D;AAEO,SAASI,cAAcA,CAC5BC,OAAyB,EACzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,MAAM;IAAEP;EAAuB,CAAC,GAAGK,OAAO;EAC1C,IAAIU,UAAU;EACd,IAAIC,wBAAwB,GAAG,KAAK;EACpC,IAAI,OAAOhB,sBAAsB,KAAK,QAAQ,EAAE;IAC9Ce,UAAU,GAAGf,sBAAsB;EACrC,CAAC,MAAM;IACLgB,wBAAwB,GAAGhB,sBAAsB,KAAK,KAAK;EAC7D;EAEA,OAAO,IAAAiB,mCAAU,EAACT,OAAO,EAAE;IACzBQ,wBAAwB;IACxBD,UAAU;IACVG,UAAU,EAAEZ,IAAI;IAChBa,eAAe,EAAEd,OAAO,CAACc;EAC3B,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/util.js.map b/node_modules/@babel/core/lib/config/util.js.map index 4157eca2c..63ffa1954 100644 --- a/node_modules/@babel/core/lib/config/util.js.map +++ b/node_modules/@babel/core/lib/config/util.js.map @@ -1 +1 @@ -{"version":3,"names":["mergeOptions","target","source","k","Object","keys","parserOpts","targetObj","mergeDefaultFields","val","undefined","isIterableIterator","value","next","Symbol","iterator"],"sources":["../../src/config/util.ts"],"sourcesContent":["import type { ValidatedOptions, NormalizedOptions } from \"./validation/options\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n"],"mappings":";;;;;;;AAEO,SAASA,YAAY,CAC1BC,MAAwB,EACxBC,MAA4C,EACtC;EACN,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAE;IACnC,IACE,CAACC,CAAC,KAAK,YAAY,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,aAAa,KACnED,MAAM,CAACC,CAAC,CAAC,EACT;MACA,MAAMG,UAAU,GAAGJ,MAAM,CAACC,CAAC,CAAC;MAC5B,MAAMI,SAAS,GAAGN,MAAM,CAACE,CAAC,CAAC,KAAKF,MAAM,CAACE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;MAC/CK,kBAAkB,CAACD,SAAS,EAAED,UAAU,CAAC;IAC3C,CAAC,MAAM;MAEL,MAAMG,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;MAErB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAU;IAC/C;EACF;AACF;AAEA,SAASD,kBAAkB,CAAeP,MAAS,EAAEC,MAAS,EAAE;EAC9D,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAiB;IAClD,MAAMO,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;IACrB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAG;EACxC;AACF;AAEO,SAASE,kBAAkB,CAACC,KAAU,EAAkC;EAC7E,OACE,CAAC,CAACA,KAAK,IACP,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,KAAK,UAAU;AAEhD;AAAC"} \ No newline at end of file +{"version":3,"names":["mergeOptions","target","source","k","Object","keys","parserOpts","targetObj","mergeDefaultFields","val","undefined","isIterableIterator","value","next","Symbol","iterator"],"sources":["../../src/config/util.ts"],"sourcesContent":["import type { ValidatedOptions, NormalizedOptions } from \"./validation/options\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n"],"mappings":";;;;;;;AAEO,SAASA,YAAYA,CAC1BC,MAAwB,EACxBC,MAA4C,EACtC;EACN,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAE;IACnC,IACE,CAACC,CAAC,KAAK,YAAY,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,aAAa,KACnED,MAAM,CAACC,CAAC,CAAC,EACT;MACA,MAAMG,UAAU,GAAGJ,MAAM,CAACC,CAAC,CAAC;MAC5B,MAAMI,SAAS,GAAGN,MAAM,CAACE,CAAC,CAAC,KAAKF,MAAM,CAACE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;MAC/CK,kBAAkB,CAACD,SAAS,EAAED,UAAU,CAAC;IAC3C,CAAC,MAAM;MAEL,MAAMG,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;MAErB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAU;IAC/C;EACF;AACF;AAEA,SAASD,kBAAkBA,CAAeP,MAAS,EAAEC,MAAS,EAAE;EAC9D,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAiB;IAClD,MAAMO,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;IACrB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAG;EACxC;AACF;AAEO,SAASE,kBAAkBA,CAACC,KAAU,EAAkC;EAC7E,OACE,CAAC,CAACA,KAAK,IACP,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,KAAK,UAAU;AAEhD;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js.map b/node_modules/@babel/core/lib/config/validation/option-assertions.js.map index c3c2092f4..d86f0025b 100644 --- a/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +++ b/node_modules/@babel/core/lib/config/validation/option-assertions.js.map @@ -1 +1 @@ -{"version":3,"names":["msg","loc","type","parent","name","index","JSON","stringify","Error","access","assertRootMode","value","undefined","assertSourceMaps","assertCompact","assertSourceType","assertCallerMetadata","obj","assertObject","prop","Object","keys","propLoc","assertInputSourceMap","assertString","assertFunction","assertBoolean","Array","isArray","assertArray","assertIgnoreList","arr","forEach","item","i","assertIgnoreItem","RegExp","assertConfigApplicableTest","checkValidTest","assertConfigFileSearch","assertBabelrcSearch","assertPluginList","assertPluginItem","length","assertPluginTarget","opts","assertTargets","isBrowsersQueryValid","browsersLoc","esmodulesLoc","assertBrowsersList","browsers","esmodules","key","val","subLoc","hasOwnProperty","call","TargetNames","validTargets","join","assertBrowserVersion","Math","round","assertAssumptions","root","inPreset","source","assumptionsNames","has"],"sources":["../../../src/config/validation/option-assertions.ts"],"sourcesContent":["import {\n isBrowsersQueryValid,\n TargetNames,\n} from \"@babel/helper-compilation-targets\";\n\nimport type {\n ConfigFileSearch,\n BabelrcSearch,\n IgnoreList,\n IgnoreItem,\n PluginList,\n PluginItem,\n PluginTarget,\n ConfigApplicableTest,\n SourceMapsOption,\n SourceTypeOption,\n CompactOption,\n RootInputSourceMapOption,\n NestingPath,\n CallerMetadata,\n RootMode,\n TargetsListOrObject,\n AssumptionName,\n} from \"./options\";\n\nimport { assumptionsNames } from \"./options\";\n\nexport type { RootPath } from \"./options\";\n\nexport type ValidatorSet = {\n [name: string]: Validator;\n};\n\nexport type Validator = (loc: OptionPath, value: unknown) => T;\n\nexport function msg(loc: NestingPath | GeneralPath): string {\n switch (loc.type) {\n case \"root\":\n return ``;\n case \"env\":\n return `${msg(loc.parent)}.env[\"${loc.name}\"]`;\n case \"overrides\":\n return `${msg(loc.parent)}.overrides[${loc.index}]`;\n case \"option\":\n return `${msg(loc.parent)}.${loc.name}`;\n case \"access\":\n return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;\n default:\n // @ts-expect-error should not happen when code is type checked\n throw new Error(`Assertion failure: Unknown type ${loc.type}`);\n }\n}\n\nexport function access(loc: GeneralPath, name: string | number): AccessPath {\n return {\n type: \"access\",\n name,\n parent: loc,\n };\n}\n\nexport type OptionPath = Readonly<{\n type: \"option\";\n name: string;\n parent: NestingPath;\n}>;\ntype AccessPath = Readonly<{\n type: \"access\";\n name: string | number;\n parent: GeneralPath;\n}>;\ntype GeneralPath = OptionPath | AccessPath;\n\nexport function assertRootMode(\n loc: OptionPath,\n value: unknown,\n): RootMode | void {\n if (\n value !== undefined &&\n value !== \"root\" &&\n value !== \"upward\" &&\n value !== \"upward-optional\"\n ) {\n throw new Error(\n `${msg(loc)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceMaps(\n loc: OptionPath,\n value: unknown,\n): SourceMapsOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n value !== \"inline\" &&\n value !== \"both\"\n ) {\n throw new Error(\n `${msg(loc)} must be a boolean, \"inline\", \"both\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCompact(\n loc: OptionPath,\n value: unknown,\n): CompactOption | void {\n if (value !== undefined && typeof value !== \"boolean\" && value !== \"auto\") {\n throw new Error(`${msg(loc)} must be a boolean, \"auto\", or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceType(\n loc: OptionPath,\n value: unknown,\n): SourceTypeOption | void {\n if (\n value !== undefined &&\n value !== \"module\" &&\n value !== \"script\" &&\n value !== \"unambiguous\"\n ) {\n throw new Error(\n `${msg(loc)} must be \"module\", \"script\", \"unambiguous\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCallerMetadata(\n loc: OptionPath,\n value: unknown,\n): CallerMetadata | undefined {\n const obj = assertObject(loc, value);\n if (obj) {\n if (typeof obj.name !== \"string\") {\n throw new Error(\n `${msg(loc)} set but does not contain \"name\" property string`,\n );\n }\n\n for (const prop of Object.keys(obj)) {\n const propLoc = access(loc, prop);\n const value = obj[prop];\n if (\n value != null &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\" &&\n typeof value !== \"number\"\n ) {\n // NOTE(logan): I'm limiting the type here so that we can guarantee that\n // the \"caller\" value will serialize to JSON nicely. We can always\n // allow more complex structures later though.\n throw new Error(\n `${msg(\n propLoc,\n )} must be null, undefined, a boolean, a string, or a number.`,\n );\n }\n }\n }\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n\nexport function assertInputSourceMap(\n loc: OptionPath,\n value: unknown,\n): RootInputSourceMapOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n (typeof value !== \"object\" || !value)\n ) {\n throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);\n }\n return value;\n}\n\nexport function assertString(loc: GeneralPath, value: unknown): string | void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new Error(`${msg(loc)} must be a string, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertFunction(\n loc: GeneralPath,\n value: unknown,\n): Function | void {\n if (value !== undefined && typeof value !== \"function\") {\n throw new Error(`${msg(loc)} must be a function, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBoolean(\n loc: GeneralPath,\n value: unknown,\n): boolean | void {\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new Error(`${msg(loc)} must be a boolean, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertObject(\n loc: GeneralPath,\n value: unknown,\n): { readonly [key: string]: unknown } | void {\n if (\n value !== undefined &&\n (typeof value !== \"object\" || Array.isArray(value) || !value)\n ) {\n throw new Error(`${msg(loc)} must be an object, or undefined`);\n }\n // @ts-expect-error todo(flow->ts) value is still typed as unknown, also assert function typically should not return a value\n return value;\n}\n\nexport function assertArray(\n loc: GeneralPath,\n value: Array | undefined | null,\n): ReadonlyArray | undefined | null {\n if (value != null && !Array.isArray(value)) {\n throw new Error(`${msg(loc)} must be an array, or undefined`);\n }\n return value;\n}\n\nexport function assertIgnoreList(\n loc: OptionPath,\n value: unknown[] | undefined,\n): IgnoreList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));\n }\n // @ts-expect-error todo(flow->ts)\n return arr;\n}\nfunction assertIgnoreItem(loc: GeneralPath, value: unknown): IgnoreItem {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"function\" &&\n !(value instanceof RegExp)\n ) {\n throw new Error(\n `${msg(\n loc,\n )} must be an array of string/Function/RegExp values, or undefined`,\n );\n }\n return value as IgnoreItem;\n}\n\nexport function assertConfigApplicableTest(\n loc: OptionPath,\n value: unknown,\n): ConfigApplicableTest | void {\n if (value === undefined) {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a string/Function/RegExp, or an array of those`,\n );\n }\n return value as ConfigApplicableTest;\n}\n\nfunction checkValidTest(value: unknown): value is string | Function | RegExp {\n return (\n typeof value === \"string\" ||\n typeof value === \"function\" ||\n value instanceof RegExp\n );\n}\n\nexport function assertConfigFileSearch(\n loc: OptionPath,\n value: unknown,\n): ConfigFileSearch | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\"\n ) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string, ` +\n `got ${JSON.stringify(value)}`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBabelrcSearch(\n loc: OptionPath,\n value: unknown,\n): BabelrcSearch | void {\n if (value === undefined || typeof value === \"boolean\") {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` +\n `or an array of those, got ${JSON.stringify(value as any)}`,\n );\n }\n return value as BabelrcSearch;\n}\n\nexport function assertPluginList(\n loc: OptionPath,\n value: unknown[] | null | undefined,\n): PluginList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n // Loop instead of using `.map` in order to preserve object identity\n // for plugin array for use during config chain processing.\n arr.forEach((item, i) => assertPluginItem(access(loc, i), item));\n }\n return arr as any;\n}\nfunction assertPluginItem(loc: GeneralPath, value: unknown): PluginItem {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n throw new Error(`${msg(loc)} must include an object`);\n }\n\n if (value.length > 3) {\n throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);\n }\n\n assertPluginTarget(access(loc, 0), value[0]);\n\n if (value.length > 1) {\n const opts = value[1];\n if (\n opts !== undefined &&\n opts !== false &&\n (typeof opts !== \"object\" || Array.isArray(opts) || opts === null)\n ) {\n throw new Error(\n `${msg(access(loc, 1))} must be an object, false, or undefined`,\n );\n }\n }\n if (value.length === 3) {\n const name = value[2];\n if (name !== undefined && typeof name !== \"string\") {\n throw new Error(\n `${msg(access(loc, 2))} must be a string, or undefined`,\n );\n }\n }\n } else {\n assertPluginTarget(loc, value);\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\nfunction assertPluginTarget(loc: GeneralPath, value: unknown): PluginTarget {\n if (\n (typeof value !== \"object\" || !value) &&\n typeof value !== \"string\" &&\n typeof value !== \"function\"\n ) {\n throw new Error(`${msg(loc)} must be a string, object, function`);\n }\n return value;\n}\n\nexport function assertTargets(\n loc: GeneralPath,\n value: any,\n): TargetsListOrObject {\n if (isBrowsersQueryValid(value)) return value;\n\n if (typeof value !== \"object\" || !value || Array.isArray(value)) {\n throw new Error(\n `${msg(loc)} must be a string, an array of strings or an object`,\n );\n }\n\n const browsersLoc = access(loc, \"browsers\");\n const esmodulesLoc = access(loc, \"esmodules\");\n\n assertBrowsersList(browsersLoc, value.browsers);\n assertBoolean(esmodulesLoc, value.esmodules);\n\n for (const key of Object.keys(value)) {\n const val = value[key];\n const subLoc = access(loc, key);\n\n if (key === \"esmodules\") assertBoolean(subLoc, val);\n else if (key === \"browsers\") assertBrowsersList(subLoc, val);\n else if (!Object.hasOwnProperty.call(TargetNames, key)) {\n const validTargets = Object.keys(TargetNames).join(\", \");\n throw new Error(\n `${msg(\n subLoc,\n )} is not a valid target. Supported targets are ${validTargets}`,\n );\n } else assertBrowserVersion(subLoc, val);\n }\n\n return value;\n}\n\nfunction assertBrowsersList(loc: GeneralPath, value: unknown) {\n if (value !== undefined && !isBrowsersQueryValid(value)) {\n throw new Error(\n `${msg(loc)} must be undefined, a string or an array of strings`,\n );\n }\n}\n\nfunction assertBrowserVersion(loc: GeneralPath, value: unknown) {\n if (typeof value === \"number\" && Math.round(value) === value) return;\n if (typeof value === \"string\") return;\n\n throw new Error(`${msg(loc)} must be a string or an integer number`);\n}\n\nexport function assertAssumptions(\n loc: GeneralPath,\n value: { [key: string]: unknown },\n): { [name: string]: boolean } | void {\n if (value === undefined) return;\n\n if (typeof value !== \"object\" || value === null) {\n throw new Error(`${msg(loc)} must be an object or undefined.`);\n }\n\n // todo(flow->ts): remove any\n let root: any = loc;\n do {\n root = root.parent;\n } while (root.type !== \"root\");\n const inPreset = root.source === \"preset\";\n\n for (const name of Object.keys(value)) {\n const subLoc = access(loc, name);\n if (!assumptionsNames.has(name as AssumptionName)) {\n throw new Error(`${msg(subLoc)} is not a supported assumption.`);\n }\n if (typeof value[name] !== \"boolean\") {\n throw new Error(`${msg(subLoc)} must be a boolean.`);\n }\n if (inPreset && value[name] === false) {\n throw new Error(\n `${msg(subLoc)} cannot be set to 'false' inside presets.`,\n );\n }\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAyBA;AAUO,SAASA,GAAG,CAACC,GAA8B,EAAU;EAC1D,QAAQA,GAAG,CAACC,IAAI;IACd,KAAK,MAAM;MACT,OAAQ,EAAC;IACX,KAAK,KAAK;MACR,OAAQ,GAAEF,GAAG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,QAAQ,EAAE;EAE/B,MAAM,IAAIH,KAAK,CAAE,GAAER,GAAG,CAACC,GAAG,CAAE,wCAAuC,CAAC;AACtE;AAEO,SAAS+D,iBAAiB,CAC/B/D,GAAgB,EAChBU,KAAiC,EACG;EACpC,IAAIA,KAAK,KAAKC,SAAS,EAAE;EAEzB,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE;IAC/C,MAAM,IAAIH,KAAK,CAAE,GAAER,GAAG,CAACC,GAAG,CAAE,kCAAiC,CAAC;EAChE;EAGA,IAAIgE,IAAS,GAAGhE,GAAG;EACnB,GAAG;IACDgE,IAAI,GAAGA,IAAI,CAAC9D,MAAM;EACpB,CAAC,QAAQ8D,IAAI,CAAC/D,IAAI,KAAK,MAAM;EAC7B,MAAMgE,QAAQ,GAAGD,IAAI,CAACE,MAAM,KAAK,QAAQ;EAEzC,KAAK,MAAM/D,IAAI,IAAIgB,MAAM,CAACC,IAAI,CAACV,KAAK,CAAC,EAAE;IACrC,MAAM4C,MAAM,GAAG9C,MAAM,CAACR,GAAG,EAAEG,IAAI,CAAC;IAChC,IAAI,CAACgE,yBAAgB,CAACC,GAAG,CAACjE,IAAI,CAAmB,EAAE;MACjD,MAAM,IAAII,KAAK,CAAE,GAAER,GAAG,CAACuD,MAAM,CAAE,iCAAgC,CAAC;IAClE;IACA,IAAI,OAAO5C,KAAK,CAACP,IAAI,CAAC,KAAK,SAAS,EAAE;MACpC,MAAM,IAAII,KAAK,CAAE,GAAER,GAAG,CAACuD,MAAM,CAAE,qBAAoB,CAAC;IACtD;IACA,IAAIW,QAAQ,IAAIvD,KAAK,CAACP,IAAI,CAAC,KAAK,KAAK,EAAE;MACrC,MAAM,IAAII,KAAK,CACZ,GAAER,GAAG,CAACuD,MAAM,CAAE,2CAA0C,CAC1D;IACH;EACF;EAGA,OAAO5C,KAAK;AACd;AAAC"} \ No newline at end of file +{"version":3,"names":["_helperCompilationTargets","data","require","_options","msg","loc","type","parent","name","index","JSON","stringify","Error","access","assertRootMode","value","undefined","assertSourceMaps","assertCompact","assertSourceType","assertCallerMetadata","obj","assertObject","prop","Object","keys","propLoc","assertInputSourceMap","assertString","assertFunction","assertBoolean","Array","isArray","assertArray","assertIgnoreList","arr","forEach","item","i","assertIgnoreItem","RegExp","assertConfigApplicableTest","checkValidTest","assertConfigFileSearch","assertBabelrcSearch","assertPluginList","assertPluginItem","length","assertPluginTarget","opts","assertTargets","isBrowsersQueryValid","browsersLoc","esmodulesLoc","assertBrowsersList","browsers","esmodules","key","val","subLoc","hasOwnProperty","call","TargetNames","validTargets","join","assertBrowserVersion","Math","round","assertAssumptions","root","inPreset","source","assumptionsNames","has"],"sources":["../../../src/config/validation/option-assertions.ts"],"sourcesContent":["import {\n isBrowsersQueryValid,\n TargetNames,\n} from \"@babel/helper-compilation-targets\";\n\nimport type {\n ConfigFileSearch,\n BabelrcSearch,\n IgnoreList,\n IgnoreItem,\n PluginList,\n PluginItem,\n PluginTarget,\n ConfigApplicableTest,\n SourceMapsOption,\n SourceTypeOption,\n CompactOption,\n RootInputSourceMapOption,\n NestingPath,\n CallerMetadata,\n RootMode,\n TargetsListOrObject,\n AssumptionName,\n} from \"./options\";\n\nimport { assumptionsNames } from \"./options\";\n\nexport type { RootPath } from \"./options\";\n\nexport type ValidatorSet = {\n [name: string]: Validator;\n};\n\nexport type Validator = (loc: OptionPath, value: unknown) => T;\n\nexport function msg(loc: NestingPath | GeneralPath): string {\n switch (loc.type) {\n case \"root\":\n return ``;\n case \"env\":\n return `${msg(loc.parent)}.env[\"${loc.name}\"]`;\n case \"overrides\":\n return `${msg(loc.parent)}.overrides[${loc.index}]`;\n case \"option\":\n return `${msg(loc.parent)}.${loc.name}`;\n case \"access\":\n return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;\n default:\n // @ts-expect-error should not happen when code is type checked\n throw new Error(`Assertion failure: Unknown type ${loc.type}`);\n }\n}\n\nexport function access(loc: GeneralPath, name: string | number): AccessPath {\n return {\n type: \"access\",\n name,\n parent: loc,\n };\n}\n\nexport type OptionPath = Readonly<{\n type: \"option\";\n name: string;\n parent: NestingPath;\n}>;\ntype AccessPath = Readonly<{\n type: \"access\";\n name: string | number;\n parent: GeneralPath;\n}>;\ntype GeneralPath = OptionPath | AccessPath;\n\nexport function assertRootMode(\n loc: OptionPath,\n value: unknown,\n): RootMode | void {\n if (\n value !== undefined &&\n value !== \"root\" &&\n value !== \"upward\" &&\n value !== \"upward-optional\"\n ) {\n throw new Error(\n `${msg(loc)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceMaps(\n loc: OptionPath,\n value: unknown,\n): SourceMapsOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n value !== \"inline\" &&\n value !== \"both\"\n ) {\n throw new Error(\n `${msg(loc)} must be a boolean, \"inline\", \"both\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCompact(\n loc: OptionPath,\n value: unknown,\n): CompactOption | void {\n if (value !== undefined && typeof value !== \"boolean\" && value !== \"auto\") {\n throw new Error(`${msg(loc)} must be a boolean, \"auto\", or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceType(\n loc: OptionPath,\n value: unknown,\n): SourceTypeOption | void {\n if (\n value !== undefined &&\n value !== \"module\" &&\n value !== \"script\" &&\n value !== \"unambiguous\"\n ) {\n throw new Error(\n `${msg(loc)} must be \"module\", \"script\", \"unambiguous\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCallerMetadata(\n loc: OptionPath,\n value: unknown,\n): CallerMetadata | undefined {\n const obj = assertObject(loc, value);\n if (obj) {\n if (typeof obj.name !== \"string\") {\n throw new Error(\n `${msg(loc)} set but does not contain \"name\" property string`,\n );\n }\n\n for (const prop of Object.keys(obj)) {\n const propLoc = access(loc, prop);\n const value = obj[prop];\n if (\n value != null &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\" &&\n typeof value !== \"number\"\n ) {\n // NOTE(logan): I'm limiting the type here so that we can guarantee that\n // the \"caller\" value will serialize to JSON nicely. We can always\n // allow more complex structures later though.\n throw new Error(\n `${msg(\n propLoc,\n )} must be null, undefined, a boolean, a string, or a number.`,\n );\n }\n }\n }\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n\nexport function assertInputSourceMap(\n loc: OptionPath,\n value: unknown,\n): RootInputSourceMapOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n (typeof value !== \"object\" || !value)\n ) {\n throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);\n }\n return value;\n}\n\nexport function assertString(loc: GeneralPath, value: unknown): string | void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new Error(`${msg(loc)} must be a string, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertFunction(\n loc: GeneralPath,\n value: unknown,\n): Function | void {\n if (value !== undefined && typeof value !== \"function\") {\n throw new Error(`${msg(loc)} must be a function, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBoolean(\n loc: GeneralPath,\n value: unknown,\n): boolean | void {\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new Error(`${msg(loc)} must be a boolean, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertObject(\n loc: GeneralPath,\n value: unknown,\n): { readonly [key: string]: unknown } | void {\n if (\n value !== undefined &&\n (typeof value !== \"object\" || Array.isArray(value) || !value)\n ) {\n throw new Error(`${msg(loc)} must be an object, or undefined`);\n }\n // @ts-expect-error todo(flow->ts) value is still typed as unknown, also assert function typically should not return a value\n return value;\n}\n\nexport function assertArray(\n loc: GeneralPath,\n value: Array | undefined | null,\n): ReadonlyArray | undefined | null {\n if (value != null && !Array.isArray(value)) {\n throw new Error(`${msg(loc)} must be an array, or undefined`);\n }\n return value;\n}\n\nexport function assertIgnoreList(\n loc: OptionPath,\n value: unknown[] | undefined,\n): IgnoreList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));\n }\n // @ts-expect-error todo(flow->ts)\n return arr;\n}\nfunction assertIgnoreItem(loc: GeneralPath, value: unknown): IgnoreItem {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"function\" &&\n !(value instanceof RegExp)\n ) {\n throw new Error(\n `${msg(\n loc,\n )} must be an array of string/Function/RegExp values, or undefined`,\n );\n }\n return value as IgnoreItem;\n}\n\nexport function assertConfigApplicableTest(\n loc: OptionPath,\n value: unknown,\n): ConfigApplicableTest | void {\n if (value === undefined) {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a string/Function/RegExp, or an array of those`,\n );\n }\n return value as ConfigApplicableTest;\n}\n\nfunction checkValidTest(value: unknown): value is string | Function | RegExp {\n return (\n typeof value === \"string\" ||\n typeof value === \"function\" ||\n value instanceof RegExp\n );\n}\n\nexport function assertConfigFileSearch(\n loc: OptionPath,\n value: unknown,\n): ConfigFileSearch | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\"\n ) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string, ` +\n `got ${JSON.stringify(value)}`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBabelrcSearch(\n loc: OptionPath,\n value: unknown,\n): BabelrcSearch | void {\n if (value === undefined || typeof value === \"boolean\") {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` +\n `or an array of those, got ${JSON.stringify(value as any)}`,\n );\n }\n return value as BabelrcSearch;\n}\n\nexport function assertPluginList(\n loc: OptionPath,\n value: unknown[] | null | undefined,\n): PluginList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n // Loop instead of using `.map` in order to preserve object identity\n // for plugin array for use during config chain processing.\n arr.forEach((item, i) => assertPluginItem(access(loc, i), item));\n }\n return arr as any;\n}\nfunction assertPluginItem(loc: GeneralPath, value: unknown): PluginItem {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n throw new Error(`${msg(loc)} must include an object`);\n }\n\n if (value.length > 3) {\n throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);\n }\n\n assertPluginTarget(access(loc, 0), value[0]);\n\n if (value.length > 1) {\n const opts = value[1];\n if (\n opts !== undefined &&\n opts !== false &&\n (typeof opts !== \"object\" || Array.isArray(opts) || opts === null)\n ) {\n throw new Error(\n `${msg(access(loc, 1))} must be an object, false, or undefined`,\n );\n }\n }\n if (value.length === 3) {\n const name = value[2];\n if (name !== undefined && typeof name !== \"string\") {\n throw new Error(\n `${msg(access(loc, 2))} must be a string, or undefined`,\n );\n }\n }\n } else {\n assertPluginTarget(loc, value);\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\nfunction assertPluginTarget(loc: GeneralPath, value: unknown): PluginTarget {\n if (\n (typeof value !== \"object\" || !value) &&\n typeof value !== \"string\" &&\n typeof value !== \"function\"\n ) {\n throw new Error(`${msg(loc)} must be a string, object, function`);\n }\n return value;\n}\n\nexport function assertTargets(\n loc: GeneralPath,\n value: any,\n): TargetsListOrObject {\n if (isBrowsersQueryValid(value)) return value;\n\n if (typeof value !== \"object\" || !value || Array.isArray(value)) {\n throw new Error(\n `${msg(loc)} must be a string, an array of strings or an object`,\n );\n }\n\n const browsersLoc = access(loc, \"browsers\");\n const esmodulesLoc = access(loc, \"esmodules\");\n\n assertBrowsersList(browsersLoc, value.browsers);\n assertBoolean(esmodulesLoc, value.esmodules);\n\n for (const key of Object.keys(value)) {\n const val = value[key];\n const subLoc = access(loc, key);\n\n if (key === \"esmodules\") assertBoolean(subLoc, val);\n else if (key === \"browsers\") assertBrowsersList(subLoc, val);\n else if (!Object.hasOwnProperty.call(TargetNames, key)) {\n const validTargets = Object.keys(TargetNames).join(\", \");\n throw new Error(\n `${msg(\n subLoc,\n )} is not a valid target. Supported targets are ${validTargets}`,\n );\n } else assertBrowserVersion(subLoc, val);\n }\n\n return value;\n}\n\nfunction assertBrowsersList(loc: GeneralPath, value: unknown) {\n if (value !== undefined && !isBrowsersQueryValid(value)) {\n throw new Error(\n `${msg(loc)} must be undefined, a string or an array of strings`,\n );\n }\n}\n\nfunction assertBrowserVersion(loc: GeneralPath, value: unknown) {\n if (typeof value === \"number\" && Math.round(value) === value) return;\n if (typeof value === \"string\") return;\n\n throw new Error(`${msg(loc)} must be a string or an integer number`);\n}\n\nexport function assertAssumptions(\n loc: GeneralPath,\n value: { [key: string]: unknown },\n): { [name: string]: boolean } | void {\n if (value === undefined) return;\n\n if (typeof value !== \"object\" || value === null) {\n throw new Error(`${msg(loc)} must be an object or undefined.`);\n }\n\n // todo(flow->ts): remove any\n let root: any = loc;\n do {\n root = root.parent;\n } while (root.type !== \"root\");\n const inPreset = root.source === \"preset\";\n\n for (const name of Object.keys(value)) {\n const subLoc = access(loc, name);\n if (!assumptionsNames.has(name as AssumptionName)) {\n throw new Error(`${msg(subLoc)} is not a supported assumption.`);\n }\n if (typeof value[name] !== \"boolean\") {\n throw new Error(`${msg(subLoc)} must be a boolean.`);\n }\n if (inPreset && value[name] === false) {\n throw new Error(\n `${msg(subLoc)} cannot be set to 'false' inside presets.`,\n );\n }\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,0BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,yBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAyBA,IAAAE,QAAA,GAAAD,OAAA;AAUO,SAASE,GAAGA,CAACC,GAA8B,EAAU;EAC1D,QAAQA,GAAG,CAACC,IAAI;IACd,KAAK,MAAM;MACT,OAAQ,EAAC;IACX,KAAK,KAAK;MACR,OAAQ,GAAEF,GAAG,CAACC,GAAG,CAACE,MAAM,CAAE,SAAQF,GAAG,CAACG,IAAK,IAAG;IAChD,KAAK,WAAW;MACd,OAAQ,GAAEJ,GAAG,CAACC,GAAG,CAACE,MAAM,CAAE,cAAaF,GAAG,CAACI,KAAM,GAAE;IACrD,KAAK,QAAQ;MACX,OAAQ,GAAEL,GAAG,CAACC,GAAG,CAACE,MAAM,CAAE,IAAGF,GAAG,CAACG,IAAK,EAAC;IACzC,KAAK,QAAQ;MACX,OAAQ,GAAEJ,GAAG,CAACC,GAAG,CAACE,MAAM,CAAE,IAAGG,IAAI,CAACC,SAAS,CAACN,GAAG,CAACG,IAAI,CAAE,GAAE;IAC1D;MAEE,MAAM,IAAII,KAAK,CAAE,mCAAkCP,GAAG,CAACC,IAAK,EAAC,CAAC;EAAC;AAErE;AAEO,SAASO,MAAMA,CAACR,GAAgB,EAAEG,IAAqB,EAAc;EAC1E,OAAO;IACLF,IAAI,EAAE,QAAQ;IACdE,IAAI;IACJD,MAAM,EAAEF;EACV,CAAC;AACH;AAcO,SAASS,cAAcA,CAC5BT,GAAe,EACfU,KAAc,EACG;EACjB,IACEA,KAAK,KAAKC,SAAS,IACnBD,KAAK,KAAK,MA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gE,yBAAgB,CAACC,GAAG,CAACjE,IAAI,CAAmB,EAAE;MACjD,MAAM,IAAII,KAAK,CAAE,GAAER,GAAG,CAACuD,MAAM,CAAE,iCAAgC,CAAC;IAClE;IACA,IAAI,OAAO5C,KAAK,CAACP,IAAI,CAAC,KAAK,SAAS,EAAE;MACpC,MAAM,IAAII,KAAK,CAAE,GAAER,GAAG,CAACuD,MAAM,CAAE,qBAAoB,CAAC;IACtD;IACA,IAAIW,QAAQ,IAAIvD,KAAK,CAACP,IAAI,CAAC,KAAK,KAAK,EAAE;MACrC,MAAM,IAAII,KAAK,CACZ,GAAER,GAAG,CAACuD,MAAM,CAAE,2CAA0C,CAC1D;IACH;EACF;EAGA,OAAO5C,KAAK;AACd;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js index 144b79203..1412de1e0 100644 --- a/node_modules/@babel/core/lib/config/validation/options.js +++ b/node_modules/@babel/core/lib/config/validation/options.js @@ -70,7 +70,7 @@ const COMMON_VALIDATORS = { moduleId: _optionAssertions.assertString }); } -const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]; +const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]; const assumptionsNames = new Set(knownAssumptions); exports.assumptionsNames = assumptionsNames; function getSource(loc) { diff --git a/node_modules/@babel/core/lib/config/validation/options.js.map b/node_modules/@babel/core/lib/config/validation/options.js.map index 5e2d81e56..1d2b6451f 100644 --- a/node_modules/@babel/core/lib/config/validation/options.js.map +++ b/node_modules/@babel/core/lib/config/validation/options.js.map @@ -1 +1 @@ -{"version":3,"names":["ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","Set","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","has","obj","prototype","hasOwnProperty","call","value","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item\";\nimport type Plugin from \"../plugin\";\n\nimport removed from \"./removed\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions\";\nimport type { ValidatorSet, Validator, OptionPath } from \"./option-assertions\";\nimport type { UnloadedDescriptor } from \"../config-descriptors\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator,\n root: assertString as Validator,\n rootMode: assertRootMode as Validator,\n configFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"configFile\"]\n >,\n\n caller: assertCallerMetadata as Validator,\n filename: assertString as Validator,\n filenameRelative: assertString as Validator<\n ValidatedOptions[\"filenameRelative\"]\n >,\n code: assertBoolean as Validator,\n ast: assertBoolean as Validator,\n\n cloneInputAst: assertBoolean as Validator,\n\n envName: assertString as Validator,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator,\n babelrcRoots: assertBabelrcSearch as Validator<\n ValidatedOptions[\"babelrcRoots\"]\n >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator,\n ignore: assertIgnoreList as Validator,\n only: assertIgnoreList as Validator,\n\n targets: assertTargets as Validator,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator<\n ValidatedOptions[\"browserslistEnv\"]\n >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n ValidatedOptions[\"inputSourceMap\"]\n >,\n presets: assertPluginList as Validator,\n plugins: assertPluginList as Validator,\n passPerPreset: assertBoolean as Validator,\n assumptions: assertAssumptions as Validator,\n\n env: assertEnvSet as Validator,\n overrides: assertOverridesList as Validator,\n\n // We could limit these to 'overrides' blocks, but it's not clear why we'd\n // bother, when the ability to limit a config to a specific set of files\n // is a fairly general useful feature.\n test: assertConfigApplicableTest as Validator,\n include: assertConfigApplicableTest as Validator,\n exclude: assertConfigApplicableTest as Validator,\n\n retainLines: assertBoolean as Validator,\n comments: assertBoolean as Validator,\n shouldPrintComment: assertFunction as Validator<\n ValidatedOptions[\"shouldPrintComment\"]\n >,\n compact: assertCompact as Validator,\n minified: assertBoolean as Validator,\n auxiliaryCommentBefore: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentBefore\"]\n >,\n auxiliaryCommentAfter: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentAfter\"]\n >,\n sourceType: assertSourceType as Validator,\n wrapPluginVisitorMethod: assertFunction as Validator<\n ValidatedOptions[\"wrapPluginVisitorMethod\"]\n >,\n highlightCode: assertBoolean as Validator,\n sourceMaps: assertSourceMaps as Validator,\n sourceMap: assertSourceMaps as Validator,\n sourceFileName: assertString as Validator,\n sourceRoot: assertString as Validator,\n parserOpts: assertObject as Validator,\n generatorOpts: assertObject as Validator,\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(COMMON_VALIDATORS, {\n getModuleId: assertFunction,\n moduleRoot: assertString,\n moduleIds: assertBoolean,\n moduleId: assertString,\n });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n cwd?: string;\n filename?: string;\n filenameRelative?: string;\n babelrc?: boolean;\n babelrcRoots?: BabelrcSearch;\n configFile?: ConfigFileSearch;\n root?: string;\n rootMode?: RootMode;\n code?: boolean;\n ast?: boolean;\n cloneInputAst?: boolean;\n inputSourceMap?: RootInputSourceMapOption;\n envName?: string;\n caller?: CallerMetadata;\n extends?: string;\n env?: EnvSet;\n ignore?: IgnoreList;\n only?: IgnoreList;\n overrides?: OverridesList;\n // Generally verify if a given config object should be applied to the given file.\n test?: ConfigApplicableTest;\n include?: ConfigApplicableTest;\n exclude?: ConfigApplicableTest;\n presets?: PluginList;\n plugins?: PluginList;\n passPerPreset?: boolean;\n assumptions?: {\n [name: string]: boolean;\n };\n // browserslists-related options\n targets?: TargetsListOrObject;\n browserslistConfigFile?: ConfigFileSearch;\n browserslistEnv?: string;\n // Options for @babel/generator\n retainLines?: boolean;\n comments?: boolean;\n shouldPrintComment?: Function;\n compact?: CompactOption;\n minified?: boolean;\n auxiliaryCommentBefore?: string;\n auxiliaryCommentAfter?: string;\n // Parser\n sourceType?: SourceTypeOption;\n wrapPluginVisitorMethod?: Function;\n highlightCode?: boolean;\n // Sourcemap generation options.\n sourceMaps?: SourceMapsOption;\n sourceMap?: SourceMapsOption;\n sourceFileName?: string;\n sourceRoot?: string;\n // Deprecate top level parserOpts\n parserOpts?: ParserOptions;\n // Deprecate top level generatorOpts\n generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n readonly targets: Targets;\n} & Omit;\n\nexport type CallerMetadata = {\n // If 'caller' is specified, require that the name is given for debugging\n // messages.\n name: string;\n};\nexport type EnvSet = {\n [x: string]: T;\n};\nexport type IgnoreItem =\n | string\n | RegExp\n | ((\n path: string | undefined,\n context: { dirname: string; caller: CallerMetadata; envName: string },\n ) => unknown);\nexport type IgnoreList = ReadonlyArray;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n | ConfigItem\n | Plugin\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray;\n\nexport type OverridesList = Array;\nexport type ConfigApplicableTest = IgnoreItem | Array;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = {} | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n | Targets\n | InputTargets\n | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n | \"arguments\"\n | \"configfile\"\n | \"babelrcfile\"\n | \"extendsfile\"\n | \"preset\"\n | \"plugin\";\n\nexport type RootPath = Readonly<{\n type: \"root\";\n source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n type: \"overrides\";\n index: number;\n parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n type: \"env\";\n name: string;\n parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n \"arrayLikeIsIterable\",\n \"constantReexports\",\n \"constantSuper\",\n \"enumerableModuleMeta\",\n \"ignoreFunctionLength\",\n \"ignoreToPrimitiveHint\",\n \"iterableIsArray\",\n \"mutableTemplateObject\",\n \"noClassCalls\",\n \"noDocumentAll\",\n \"noIncompleteNsImportDetection\",\n \"noNewArrows\",\n \"objectRestNoSymbols\",\n \"privateFieldsAsProperties\",\n \"pureGetters\",\n \"setClassMethods\",\n \"setComputedProperties\",\n \"setPublicClassFields\",\n \"setSpreadProperties\",\n \"skipForOfIteratorClosing\",\n \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = typeof knownAssumptions[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n type: OptionsSource,\n opts: {},\n filename?: string,\n): ValidatedOptions {\n try {\n return validateNested(\n {\n type: \"root\",\n source: type,\n },\n opts,\n );\n } catch (error) {\n const configError = new ConfigError(error.message, filename);\n // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n if (error.code) configError.code = error.code;\n throw configError;\n }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n const type = getSource(loc);\n\n assertNoDuplicateSourcemap(opts);\n\n Object.keys(opts).forEach((key: string) => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc,\n } as const;\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n }\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(\n `${msg(optLoc)} is only allowed in root programmatic options`,\n );\n }\n if (\n type !== \"arguments\" &&\n type !== \"configfile\" &&\n BABELRC_VALIDATORS[key]\n ) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(\n `${msg(\n optLoc,\n )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n `or babel.config.js/config file options`,\n );\n }\n\n throw new Error(\n `${msg(\n optLoc,\n )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n );\n }\n\n const validator =\n COMMON_VALIDATORS[key] ||\n NONPRESET_VALIDATORS[key] ||\n BABELRC_VALIDATORS[key] ||\n ROOT_VALIDATORS[key] ||\n (throwUnknownError as Validator);\n\n validator(optLoc, opts[key]);\n });\n\n return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n const key = loc.name;\n\n if (removed[key]) {\n const { message, version = 5 } = removed[key];\n\n throw new Error(\n `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n );\n } else {\n // eslint-disable-next-line max-len\n const unknownOptErr = new Error(\n `Unknown option: ${msg(\n loc,\n )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n );\n // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n throw unknownOptErr;\n }\n}\n\nfunction has(obj: {}, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction assertNoDuplicateSourcemap(opts: {}): void {\n if (has(opts, \"sourceMap\") && has(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(\n loc: OptionPath,\n value: unknown,\n): void | EnvSet {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n }\n const parent: RootPath | OverridesPath = loc.parent;\n\n const obj = assertObject(loc, value);\n if (obj) {\n // Validate but don't copy the .env object in order to preserve\n // object identity for use during config chain processing.\n for (const envName of Object.keys(obj)) {\n const env = assertObject(access(loc, envName), obj[envName]);\n if (!env) continue;\n\n const envLoc = {\n type: \"env\",\n name: envName,\n parent,\n } as const;\n validateNested(envLoc, env);\n }\n }\n return obj;\n}\n\nfunction assertOverridesList(\n loc: OptionPath,\n value: unknown[],\n): undefined | OverridesList {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n }\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n }\n const parent: RootPath = loc.parent;\n\n const arr = assertArray(loc, value);\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = access(loc, index);\n const env = assertObject(objLoc, item);\n if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent,\n } as const;\n validateNested(overridesLoc, env);\n }\n }\n return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs(\n items: Array,\n index: number,\n type: \"plugin\" | \"preset\",\n e: Error,\n): void {\n if (index === 0) return;\n\n const lastItem = items[index - 1];\n const thisItem = items[index];\n\n if (\n lastItem.file &&\n lastItem.options === undefined &&\n typeof thisItem.value === \"object\"\n ) {\n e.message +=\n `\\n- Maybe you meant to use\\n` +\n `\"${type}s\": [\\n [\"${lastItem.file.request}\", ${JSON.stringify(\n thisItem.value,\n undefined,\n 2,\n )}]\\n]\\n` +\n `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n }\n}\n"],"mappings":";;;;;;;;AAKA;AACA;AA0BA;AAEA,MAAMA,eAA6B,GAAG;EACpCC,GAAG,EAAEC,8BAAkD;EACvDC,IAAI,EAAED,8BAAmD;EACzDE,QAAQ,EAAEC,gCAAyD;EACnEC,UAAU,EAAEC,wCAEX;EAEDC,MAAM,EAAEC,sCAA6D;EACrEC,QAAQ,EAAER,8BAAuD;EACjES,gBAAgB,EAAET,8BAEjB;EACDU,IAAI,EAAEC,+BAAoD;EAC1DC,GAAG,EAAED,+BAAmD;EAExDE,aAAa,EAAEF,+BAA6D;EAE5EG,OAAO,EAAEd;AACX,CAAC;AAED,MAAMe,kBAAgC,GAAG;EACvCC,OAAO,EAAEL,+BAAuD;EAChEM,YAAY,EAAEC;AAGhB,CAAC;AAED,MAAMC,oBAAkC,GAAG;EACzCC,OAAO,EAAEpB,8BAAsD;EAC/DqB,MAAM,EAAEC,kCAAyD;EACjEC,IAAI,EAAED,kCAAuD;EAE7DE,OAAO,EAAEC,+BAAuD;EAChEC,sBAAsB,EAAErB,wCAEvB;EACDsB,eAAe,EAAE3B;AAGnB,CAAC;AAED,MAAM4B,iBAA+B,GAAG;EAItCC,cAAc,EAAEC,sCAEf;EACDC,OAAO,EAAEC,kCAA0D;EACnEC,OAAO,EAAED,kCAA0D;EACnEE,aAAa,EAAEvB,+BAA6D;EAC5EwB,WAAW,EAAEC,mCAA+D;EAE5EC,GAAG,EAAEC,YAAkD;EACvDC,SAAS,EAAEC,mBAA+D;EAK1EC,IAAI,EAAEC,4CAAiE;EACvEC,OAAO,EAAED,4CAAoE;EAC7EE,OAAO,EAAEF,4CAAoE;EAE7EG,WAAW,EAAElC,+BAA2D;EACxEmC,QAAQ,EAAEnC,+BAAwD;EAClEoC,kBAAkB,EAAEC,gCAEnB;EACDC,OAAO,EAAEC,+BAAuD;EAChEC,QAAQ,EAAExC,+BAAwD;EAClEyC,sBAAsB,EAAEpD,8B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;IACP,KAAK,MAAM,CAACE,KAAK,EAAEC,IAAI,CAAC,IAAIH,GAAG,CAACI,OAAO,EAAE,EAAE;MACzC,MAAMC,MAAM,GAAG,IAAAP,wBAAM,EAAC9B,GAAG,EAAEkC,KAAK,CAAC;MACjC,MAAMzE,GAAG,GAAG,IAAA2B,8BAAY,EAACiD,MAAM,EAAEF,IAAI,CAAC;MACtC,IAAI,CAAC1E,GAAG,EAAE,MAAM,IAAIwD,KAAK,CAAE,GAAE,IAAAC,qBAAG,EAACmB,MAAM,CAAE,oBAAmB,CAAC;MAE7D,MAAMC,YAAY,GAAG;QACnBrC,IAAI,EAAE,WAAW;QACjBiC,KAAK;QACL/B;MACF,CAAU;MACVG,cAAc,CAACgC,YAAY,EAAE7E,GAAG,CAAC;IACnC;EACF;EACA,OAAOuE,GAAG;AACZ;AAEO,SAASO,+BAA+B,CAC7CC,KAAgC,EAChCN,KAAa,EACbjC,IAAyB,EACzBwC,CAAQ,EACF;EACN,IAAIP,KAAK,KAAK,CAAC,EAAE;EAEjB,MAAMQ,QAAQ,GAAGF,KAAK,CAACN,KAAK,GAAG,CAAC,CAAC;EACjC,MAAMS,QAAQ,GAAGH,KAAK,CAACN,KAAK,CAAC;EAE7B,IACEQ,QAAQ,CAACE,IAAI,IACbF,QAAQ,CAACG,OAAO,KAAKC,SAAS,IAC9B,OAAOH,QAAQ,CAACd,KAAK,KAAK,QAAQ,EAClC;IACAY,CAAC,CAAC/B,OAAO,IACN,8BAA6B,GAC7B,IAAGT,IAAK,cAAayC,QAAQ,CAACE,IAAI,CAACG,OAAQ,MAAKC,IAAI,CAACC,SAAS,CAC7DN,QAAQ,CAACd,KAAK,EACdiB,SAAS,EACT,CAAC,CACD,QAAO,GACR,iBAAgB7C,IAAK,gEAA+D;EACzF;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["_removed","require","_optionAssertions","_configError","ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","Set","exports","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","has","obj","prototype","hasOwnProperty","call","value","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item\";\nimport type Plugin from \"../plugin\";\n\nimport removed from \"./removed\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions\";\nimport type { ValidatorSet, Validator, OptionPath } from \"./option-assertions\";\nimport type { UnloadedDescriptor } from \"../config-descriptors\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator,\n root: assertString as Validator,\n rootMode: assertRootMode as Validator,\n configFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"configFile\"]\n >,\n\n caller: assertCallerMetadata as Validator,\n filename: assertString as Validator,\n filenameRelative: assertString as Validator<\n ValidatedOptions[\"filenameRelative\"]\n >,\n code: assertBoolean as Validator,\n ast: assertBoolean as Validator,\n\n cloneInputAst: assertBoolean as Validator,\n\n envName: assertString as Validator,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator,\n babelrcRoots: assertBabelrcSearch as Validator<\n ValidatedOptions[\"babelrcRoots\"]\n >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator,\n ignore: assertIgnoreList as Validator,\n only: assertIgnoreList as Validator,\n\n targets: assertTargets as Validator,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator<\n ValidatedOptions[\"browserslistEnv\"]\n >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n ValidatedOptions[\"inputSourceMap\"]\n >,\n presets: assertPluginList as Validator,\n plugins: assertPluginList as Validator,\n passPerPreset: assertBoolean as Validator,\n assumptions: assertAssumptions as Validator,\n\n env: assertEnvSet as Validator,\n overrides: assertOverridesList as Validator,\n\n // We could limit these to 'overrides' blocks, but it's not clear why we'd\n // bother, when the ability to limit a config to a specific set of files\n // is a fairly general useful feature.\n test: assertConfigApplicableTest as Validator,\n include: assertConfigApplicableTest as Validator,\n exclude: assertConfigApplicableTest as Validator,\n\n retainLines: assertBoolean as Validator,\n comments: assertBoolean as Validator,\n shouldPrintComment: assertFunction as Validator<\n ValidatedOptions[\"shouldPrintComment\"]\n >,\n compact: assertCompact as Validator,\n minified: assertBoolean as Validator,\n auxiliaryCommentBefore: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentBefore\"]\n >,\n auxiliaryCommentAfter: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentAfter\"]\n >,\n sourceType: assertSourceType as Validator,\n wrapPluginVisitorMethod: assertFunction as Validator<\n ValidatedOptions[\"wrapPluginVisitorMethod\"]\n >,\n highlightCode: assertBoolean as Validator,\n sourceMaps: assertSourceMaps as Validator,\n sourceMap: assertSourceMaps as Validator,\n sourceFileName: assertString as Validator,\n sourceRoot: assertString as Validator,\n parserOpts: assertObject as Validator,\n generatorOpts: assertObject as Validator,\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(COMMON_VALIDATORS, {\n getModuleId: assertFunction,\n moduleRoot: assertString,\n moduleIds: assertBoolean,\n moduleId: assertString,\n });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n cwd?: string;\n filename?: string;\n filenameRelative?: string;\n babelrc?: boolean;\n babelrcRoots?: BabelrcSearch;\n configFile?: ConfigFileSearch;\n root?: string;\n rootMode?: RootMode;\n code?: boolean;\n ast?: boolean;\n cloneInputAst?: boolean;\n inputSourceMap?: RootInputSourceMapOption;\n envName?: string;\n caller?: CallerMetadata;\n extends?: string;\n env?: EnvSet;\n ignore?: IgnoreList;\n only?: IgnoreList;\n overrides?: OverridesList;\n // Generally verify if a given config object should be applied to the given file.\n test?: ConfigApplicableTest;\n include?: ConfigApplicableTest;\n exclude?: ConfigApplicableTest;\n presets?: PluginList;\n plugins?: PluginList;\n passPerPreset?: boolean;\n assumptions?: {\n [name: string]: boolean;\n };\n // browserslists-related options\n targets?: TargetsListOrObject;\n browserslistConfigFile?: ConfigFileSearch;\n browserslistEnv?: string;\n // Options for @babel/generator\n retainLines?: boolean;\n comments?: boolean;\n shouldPrintComment?: Function;\n compact?: CompactOption;\n minified?: boolean;\n auxiliaryCommentBefore?: string;\n auxiliaryCommentAfter?: string;\n // Parser\n sourceType?: SourceTypeOption;\n wrapPluginVisitorMethod?: Function;\n highlightCode?: boolean;\n // Sourcemap generation options.\n sourceMaps?: SourceMapsOption;\n sourceMap?: SourceMapsOption;\n sourceFileName?: string;\n sourceRoot?: string;\n // Deprecate top level parserOpts\n parserOpts?: ParserOptions;\n // Deprecate top level generatorOpts\n generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n readonly targets: Targets;\n} & Omit;\n\nexport type CallerMetadata = {\n // If 'caller' is specified, require that the name is given for debugging\n // messages.\n name: string;\n};\nexport type EnvSet = {\n [x: string]: T;\n};\nexport type IgnoreItem =\n | string\n | RegExp\n | ((\n path: string | undefined,\n context: { dirname: string; caller: CallerMetadata; envName: string },\n ) => unknown);\nexport type IgnoreList = ReadonlyArray;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n | ConfigItem\n | Plugin\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray;\n\nexport type OverridesList = Array;\nexport type ConfigApplicableTest = IgnoreItem | Array;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = {} | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n | Targets\n | InputTargets\n | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n | \"arguments\"\n | \"configfile\"\n | \"babelrcfile\"\n | \"extendsfile\"\n | \"preset\"\n | \"plugin\";\n\nexport type RootPath = Readonly<{\n type: \"root\";\n source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n type: \"overrides\";\n index: number;\n parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n type: \"env\";\n name: string;\n parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n \"arrayLikeIsIterable\",\n \"constantReexports\",\n \"constantSuper\",\n \"enumerableModuleMeta\",\n \"ignoreFunctionLength\",\n \"ignoreToPrimitiveHint\",\n \"iterableIsArray\",\n \"mutableTemplateObject\",\n \"noClassCalls\",\n \"noDocumentAll\",\n \"noIncompleteNsImportDetection\",\n \"noNewArrows\",\n \"objectRestNoSymbols\",\n \"privateFieldsAsSymbols\",\n \"privateFieldsAsProperties\",\n \"pureGetters\",\n \"setClassMethods\",\n \"setComputedProperties\",\n \"setPublicClassFields\",\n \"setSpreadProperties\",\n \"skipForOfIteratorClosing\",\n \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = typeof knownAssumptions[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n type: OptionsSource,\n opts: {},\n filename?: string,\n): ValidatedOptions {\n try {\n return validateNested(\n {\n type: \"root\",\n source: type,\n },\n opts,\n );\n } catch (error) {\n const configError = new ConfigError(error.message, filename);\n // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n if (error.code) configError.code = error.code;\n throw configError;\n }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n const type = getSource(loc);\n\n assertNoDuplicateSourcemap(opts);\n\n Object.keys(opts).forEach((key: string) => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc,\n } as const;\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n }\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(\n `${msg(optLoc)} is only allowed in root programmatic options`,\n );\n }\n if (\n type !== \"arguments\" &&\n type !== \"configfile\" &&\n BABELRC_VALIDATORS[key]\n ) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(\n `${msg(\n optLoc,\n )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n `or babel.config.js/config file options`,\n );\n }\n\n throw new Error(\n `${msg(\n optLoc,\n )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n );\n }\n\n const validator =\n COMMON_VALIDATORS[key] ||\n NONPRESET_VALIDATORS[key] ||\n BABELRC_VALIDATORS[key] ||\n ROOT_VALIDATORS[key] ||\n (throwUnknownError as Validator);\n\n validator(optLoc, opts[key]);\n });\n\n return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n const key = loc.name;\n\n if (removed[key]) {\n const { message, version = 5 } = removed[key];\n\n throw new Error(\n `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n );\n } else {\n // eslint-disable-next-line max-len\n const unknownOptErr = new Error(\n `Unknown option: ${msg(\n loc,\n )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n );\n // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n throw unknownOptErr;\n }\n}\n\nfunction has(obj: {}, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction assertNoDuplicateSourcemap(opts: {}): void {\n if (has(opts, \"sourceMap\") && has(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(\n loc: OptionPath,\n value: unknown,\n): void | EnvSet {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n }\n const parent: RootPath | OverridesPath = loc.parent;\n\n const obj = assertObject(loc, value);\n if (obj) {\n // Validate but don't copy the .env object in order to preserve\n // object identity for use during config chain processing.\n for (const envName of Object.keys(obj)) {\n const env = assertObject(access(loc, envName), obj[envName]);\n if (!env) continue;\n\n const envLoc = {\n type: \"env\",\n name: envName,\n parent,\n } as const;\n validateNested(envLoc, env);\n }\n }\n return obj;\n}\n\nfunction assertOverridesList(\n loc: OptionPath,\n value: unknown[],\n): undefined | OverridesList {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n }\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n }\n const parent: RootPath = loc.parent;\n\n const arr = assertArray(loc, value);\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = access(loc, index);\n const env = assertObject(objLoc, item);\n if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent,\n } as const;\n validateNested(overridesLoc, env);\n }\n }\n return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs(\n items: Array,\n index: number,\n type: \"plugin\" | \"preset\",\n e: Error,\n): void {\n if (index === 0) return;\n\n const lastItem = items[index - 1];\n const thisItem = items[index];\n\n if (\n lastItem.file &&\n lastItem.options === undefined &&\n typeof thisItem.value === \"object\"\n ) {\n e.message +=\n `\\n- Maybe you meant to use\\n` +\n `\"${type}s\": [\\n [\"${lastItem.file.request}\", ${JSON.stringify(\n thisItem.value,\n undefined,\n 2,\n )}]\\n]\\n` +\n `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n }\n}\n"],"mappings":";;;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AA0BA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,eAA6B,GAAG;EACpCC,GAAG,EAAEC,8BAAkD;EACvDC,IAAI,EAAED,8BAAmD;EACzDE,QAAQ,EAAEC,gCAAyD;EACnEC,UAAU,EAAEC,wCAEX;EAEDC,MAAM,E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GAAG,IAAA2B,8BAAY,EAACkD,MAAM,EAAEF,IAAI,CAAC;MACtC,IAAI,CAAC3E,GAAG,EAAE,MAAM,IAAIyD,KAAK,CAAE,GAAE,IAAAC,qBAAG,EAACmB,MAAM,CAAE,oBAAmB,CAAC;MAE7D,MAAMC,YAAY,GAAG;QACnBrC,IAAI,EAAE,WAAW;QACjBiC,KAAK;QACL/B;MACF,CAAU;MACVG,cAAc,CAACgC,YAAY,EAAE9E,GAAG,CAAC;IACnC;EACF;EACA,OAAOwE,GAAG;AACZ;AAEO,SAASO,+BAA+BA,CAC7CC,KAAgC,EAChCN,KAAa,EACbjC,IAAyB,EACzBwC,CAAQ,EACF;EACN,IAAIP,KAAK,KAAK,CAAC,EAAE;EAEjB,MAAMQ,QAAQ,GAAGF,KAAK,CAACN,KAAK,GAAG,CAAC,CAAC;EACjC,MAAMS,QAAQ,GAAGH,KAAK,CAACN,KAAK,CAAC;EAE7B,IACEQ,QAAQ,CAACE,IAAI,IACbF,QAAQ,CAACG,OAAO,KAAKC,SAAS,IAC9B,OAAOH,QAAQ,CAACd,KAAK,KAAK,QAAQ,EAClC;IACAY,CAAC,CAAC/B,OAAO,IACN,8BAA6B,GAC7B,IAAGT,IAAK,cAAayC,QAAQ,CAACE,IAAI,CAACG,OAAQ,MAAKC,IAAI,CAACC,SAAS,CAC7DN,QAAQ,CAACd,KAAK,EACdiB,SAAS,EACT,CAAC,CACD,QAAO,GACR,iBAAgB7C,IAAK,gEAA+D;EACzF;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js.map b/node_modules/@babel/core/lib/config/validation/plugins.js.map index fbaf16edd..a76abc768 100644 --- a/node_modules/@babel/core/lib/config/validation/plugins.js.map +++ b/node_modules/@babel/core/lib/config/validation/plugins.js.map @@ -1 +1 @@ -{"version":3,"names":["VALIDATORS","name","assertString","manipulateOptions","assertFunction","pre","post","inherits","visitor","assertVisitorMap","parserOverride","generatorOverride","loc","value","obj","assertObject","Object","keys","forEach","prop","assertVisitorHandler","enter","exit","Error","msg","key","handler","validatePluginObject","rootPath","type","source","validator","optLoc","parent","invalidPluginPropertyError","code"],"sources":["../../../src/config/validation/plugins.ts"],"sourcesContent":["import {\n assertString,\n assertFunction,\n assertObject,\n msg,\n} from \"./option-assertions\";\n\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n RootPath,\n} from \"./option-assertions\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options\";\nimport type { File, PluginPass } from \"../../index\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n name: assertString as Validator,\n manipulateOptions: assertFunction as Validator<\n PluginObject[\"manipulateOptions\"]\n >,\n pre: assertFunction as Validator,\n post: assertFunction as Validator,\n inherits: assertFunction as Validator,\n visitor: assertVisitorMap as Validator,\n\n parserOverride: assertFunction as Validator,\n generatorOverride: assertFunction as Validator<\n PluginObject[\"generatorOverride\"]\n >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n const obj = assertObject(loc, value);\n if (obj) {\n Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop]));\n\n if (obj.enter || obj.exit) {\n throw new Error(\n `${msg(\n loc,\n )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n );\n }\n }\n return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n key: string,\n value: unknown,\n): VisitorHandler | void {\n if (value && typeof value === \"object\") {\n Object.keys(value).forEach((handler: string) => {\n if (handler !== \"enter\" && handler !== \"exit\") {\n throw new Error(\n `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n );\n }\n });\n } else if (typeof value !== \"function\") {\n throw new Error(`.visitor[\"${key}\"] must be a function`);\n }\n\n return value as any;\n}\n\ntype VisitorHandler =\n | Function\n | {\n enter?: Function;\n exit?: Function;\n };\n\nexport type PluginObject = {\n name?: string;\n manipulateOptions?: (\n options: ValidatedOptions,\n parserOpts: ParserOptions,\n ) => void;\n pre?: (this: S, file: File) => void;\n post?: (this: S, file: File) => void;\n inherits?: Function;\n visitor?: Visitor;\n parserOverride?: Function;\n generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n [key: string]: unknown;\n}): PluginObject {\n const rootPath: RootPath = {\n type: \"root\",\n source: \"plugin\",\n };\n Object.keys(obj).forEach((key: string) => {\n const validator = VALIDATORS[key];\n\n if (validator) {\n const optLoc: OptionPath = {\n type: \"option\",\n name: key,\n parent: rootPath,\n };\n validator(optLoc, obj[key]);\n } else {\n const invalidPluginPropertyError = new Error(\n `.${key} is not a valid Plugin property`,\n );\n // @ts-expect-error todo(flow->ts) consider additing BabelConfigError with code field\n invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n throw invalidPluginPropertyError;\n }\n });\n\n return obj as any;\n}\n"],"mappings":";;;;;;AAAA;AAqBA,MAAMA,UAAwB,GAAG;EAC/BC,IAAI,EAAEC,8BAA+C;EACrDC,iBAAiB,EAAEC,gCAElB;EACDC,GAAG,EAAED,gCAAgD;EACrDE,IAAI,EAAEF,gCAAiD;EACvDG,QAAQ,EAAEH,gCAAqD;EAC/DI,OAAO,EAAEC,gBAAsD;EAE/DC,cAAc,EAAEN,gCAA2D;EAC3EO,iBAAiB,EAAEP;AAGrB,CAAC;AAED,SAASK,gBAAgB,CAACG,GAAe,EAAEC,KAAc,EAAW;EAClE,MAAMC,GAAG,GAAG,IAAAC,8BAAY,EAACH,GAAG,EAAEC,KAAK,CAAC;EACpC,IAAIC,GAAG,EAAE;IACPE,MAAM,CAACC,IAAI,CAACH,GAAG,CAAC,CAACI,OAAO,CAACC,IAAI,IAAIC,oBAAoB,CAACD,IAAI,EAAEL,GAAG,CAACK,IAAI,CAAC,CAAC,CAAC;IAEvE,IAAIL,GAAG,CAACO,KAAK,IAAIP,GAAG,CAACQ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,CAAC;EAEF,OAAOpB,GAAG;AACZ;AAAC"} \ No newline at end of file +{"version":3,"names":["_optionAssertions","require","VALIDATORS","name","assertString","manipulateOptions","assertFunction","pre","post","inherits","visitor","assertVisitorMap","parserOverride","generatorOverride","loc","value","obj","assertObject","Object","keys","forEach","prop","assertVisitorHandler","enter","exit","Error","msg","key","handler","validatePluginObject","rootPath","type","source","validator","optLoc","parent","invalidPluginPropertyError","code"],"sources":["../../../src/config/validation/plugins.ts"],"sourcesContent":["import {\n assertString,\n assertFunction,\n assertObject,\n msg,\n} from \"./option-assertions\";\n\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n RootPath,\n} from \"./option-assertions\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options\";\nimport type { File, PluginPass } from \"../../index\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n name: assertString as Validator,\n manipulateOptions: assertFunction as Validator<\n PluginObject[\"manipulateOptions\"]\n >,\n pre: assertFunction as Validator,\n post: assertFunction as Validator,\n inherits: assertFunction as Validator,\n visitor: assertVisitorMap as Validator,\n\n parserOverride: assertFunction as Validator,\n generatorOverride: assertFunction as Validator<\n PluginObject[\"generatorOverride\"]\n >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n const obj = assertObject(loc, value);\n if (obj) {\n Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop]));\n\n if (obj.enter || obj.exit) {\n throw new Error(\n `${msg(\n loc,\n )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n );\n }\n }\n return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n key: string,\n value: unknown,\n): VisitorHandler | void {\n if (value && typeof value === \"object\") {\n Object.keys(value).forEach((handler: string) => {\n if (handler !== \"enter\" && handler !== \"exit\") {\n throw new Error(\n `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n );\n }\n });\n } else if (typeof value !== \"function\") {\n throw new Error(`.visitor[\"${key}\"] must be a function`);\n }\n\n return value as any;\n}\n\ntype VisitorHandler =\n | Function\n | {\n enter?: Function;\n exit?: Function;\n };\n\nexport type PluginObject = {\n name?: string;\n manipulateOptions?: (\n options: ValidatedOptions,\n parserOpts: ParserOptions,\n ) => void;\n pre?: (this: S, file: File) => void;\n post?: (this: S, file: File) => void;\n inherits?: Function;\n visitor?: Visitor;\n parserOverride?: Function;\n generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n [key: string]: unknown;\n}): PluginObject {\n const rootPath: RootPath = {\n type: \"root\",\n source: \"plugin\",\n };\n Object.keys(obj).forEach((key: string) => {\n const validator = VALIDATORS[key];\n\n if (validator) {\n const optLoc: OptionPath = {\n type: \"option\",\n name: key,\n parent: rootPath,\n };\n validator(optLoc, obj[key]);\n } else {\n const invalidPluginPropertyError = new Error(\n `.${key} is not a valid Plugin property`,\n );\n // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n throw invalidPluginPropertyError;\n }\n });\n\n return obj as any;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAqBA,MAAMC,UAAwB,GAAG;EAC/BC,IAAI,EAAEC,8BAA+C;EACrDC,iBAAiB,EAAEC,gCAElB;EACDC,GAAG,EAAED,gCAAgD;EACrDE,IAAI,EAAEF,gCAAiD;EACvDG,QAAQ,EAAEH,gCAAqD;EAC/DI,OAAO,EAAEC,gBAAsD;EAE/DC,cAAc,EAAEN,gCAA2D;EAC3EO,iBAAiB,EAAEP;AAGrB,CAAC;AAED,SAASK,gBAAgBA,CAACG,GAAe,EAAEC,KAAc,EAAW;EAClE,MAAMC,GAAG,GAAG,IAAAC,8BAAY,EAACH,GAAG,EAAEC,KAAK,CAAC;EACpC,IAAIC,GA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AG,CAACW,GAAG,CAAC,CAAC;IAC7B,CAAC,MAAM;MACL,MAAMS,0BAA0B,GAAG,IAAIX,KAAK,CACzC,IAAGE,GAAI,iCAAgC,CACzC;MAEDS,0BAA0B,CAACC,IAAI,GAAG,+BAA+B;MACjE,MAAMD,0BAA0B;IAClC;EACF,CAAC,CAAC;EAEF,OAAOpB,GAAG;AACZ;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/removed.js.map b/node_modules/@babel/core/lib/config/validation/removed.js.map index da9a0972e..51bffd2e2 100644 --- a/node_modules/@babel/core/lib/config/validation/removed.js.map +++ b/node_modules/@babel/core/lib/config/validation/removed.js.map @@ -1 +1 @@ -{"version":3,"names":["auxiliaryComment","message","blacklist","breakConfig","experimental","externalHelpers","extra","jsxPragma","loose","metadataUsedHelpers","modules","nonStandard","optional","sourceMapName","stage","whitelist","resolveModuleSource","version","metadata","sourceMapTarget"],"sources":["../../../src/config/validation/removed.ts"],"sourcesContent":["export default {\n auxiliaryComment: {\n message: \"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\",\n },\n blacklist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n breakConfig: {\n message: \"This is not a necessary option in Babel 6\",\n },\n experimental: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n externalHelpers: {\n message:\n \"Use the `external-helpers` plugin instead. \" +\n \"Check out http://babeljs.io/docs/plugins/external-helpers/\",\n },\n extra: {\n message: \"\",\n },\n jsxPragma: {\n message:\n \"use the `pragma` option in the `react-jsx` plugin. \" +\n \"Check out http://babeljs.io/docs/plugins/transform-react-jsx/\",\n },\n loose: {\n message:\n \"Specify the `loose` option for the relevant plugin you are using \" +\n \"or use a preset that sets the option.\",\n },\n metadataUsedHelpers: {\n message: \"Not required anymore as this is enabled by default\",\n },\n modules: {\n message:\n \"Use the corresponding module transform plugin in the `plugins` option. \" +\n \"Check out http://babeljs.io/docs/plugins/#modules\",\n },\n nonStandard: {\n message:\n \"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. \" +\n \"Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\",\n },\n optional: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n sourceMapName: {\n message:\n \"The `sourceMapName` option has been removed because it makes more sense for the \" +\n \"tooling that calls Babel to assign `map.file` themselves.\",\n },\n stage: {\n message:\n \"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\",\n },\n whitelist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n\n resolveModuleSource: {\n version: 6,\n message: \"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\",\n },\n metadata: {\n version: 6,\n message:\n \"Generated plugin metadata is always included in the output result\",\n },\n sourceMapTarget: {\n version: 6,\n message:\n \"The `sourceMapTarget` option has been removed because it makes more sense for the tooling \" +\n \"that calls Babel to assign `map.file` themselves.\",\n },\n} as { [name: string]: { version?: number; message: string } };\n"],"mappings":";;;;;;eAAe;EACbA,gBAAgB,EAAE;IAChBC,OAAO,EAAE;EACX,CAAC;EACDC,SAAS,EAAE;IACTD,OAAO,EAAE;EACX,CAAC;EACDE,WAAW,EAAE;IACXF,OAAO,EAAE;EACX,CAAC;EACDG,YAAY,EAAE;IACZH,OAAO,EAAE;EACX,CAAC;EACDI,eAAe,EAAE;IACfJ,OAAO,EACL,6CAA6C,GAC7C;EACJ,CAAC;EACDK,KAAK,EAAE;IACLL,OAAO,EAAE;EACX,CAAC;EACDM,SAAS,EAAE;IACTN,OAAO,EACL,qDAAqD,GACrD;EACJ,CAAC;EACDO,KAAK,EAAE;IACLP,OAAO,EACL,mEAAmE,GACnE;EACJ,CAAC;EACDQ,mBAAmB,EAAE;IACnBR,OAAO,EAAE;EACX,CAAC;EACDS,OAAO,EAAE;IACPT,OAAO,EACL,yEAAyE,GACzE;EACJ,CAAC;EACDU,WAAW,EAAE;IACXV,OAAO,EACL,8EAA8E,GAC9E;EACJ,CAAC;EACDW,QAAQ,EAAE;IACRX,OAAO,EAAE;EACX,CAAC;EACDY,aAAa,EAAE;IACbZ,OAAO,EACL,kFAAkF,GAClF;EACJ,CAAC;EACDa,KAAK,EAAE;IACLb,OAAO,EACL;EACJ,CAAC;EACDc,SAAS,EAAE;IACTd,OAAO,EAAE;EACX,CAAC;EAEDe,mBAAmB,EAAE;IACnBC,OAAO,EAAE,CAAC;IACVhB,OAAO,EAAE;EACX,CAAC;EACDiB,QAAQ,EAAE;IACRD,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL;EACJ,CAAC;EACDkB,eAAe,EAAE;IACfF,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL,4FAA4F,GAC5F;EACJ;AACF,CAAC;AAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["auxiliaryComment","message","blacklist","breakConfig","experimental","externalHelpers","extra","jsxPragma","loose","metadataUsedHelpers","modules","nonStandard","optional","sourceMapName","stage","whitelist","resolveModuleSource","version","metadata","sourceMapTarget","exports","default","_default"],"sources":["../../../src/config/validation/removed.ts"],"sourcesContent":["export default {\n auxiliaryComment: {\n message: \"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\",\n },\n blacklist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n breakConfig: {\n message: \"This is not a necessary option in Babel 6\",\n },\n experimental: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n externalHelpers: {\n message:\n \"Use the `external-helpers` plugin instead. \" +\n \"Check out http://babeljs.io/docs/plugins/external-helpers/\",\n },\n extra: {\n message: \"\",\n },\n jsxPragma: {\n message:\n \"use the `pragma` option in the `react-jsx` plugin. \" +\n \"Check out http://babeljs.io/docs/plugins/transform-react-jsx/\",\n },\n loose: {\n message:\n \"Specify the `loose` option for the relevant plugin you are using \" +\n \"or use a preset that sets the option.\",\n },\n metadataUsedHelpers: {\n message: \"Not required anymore as this is enabled by default\",\n },\n modules: {\n message:\n \"Use the corresponding module transform plugin in the `plugins` option. \" +\n \"Check out http://babeljs.io/docs/plugins/#modules\",\n },\n nonStandard: {\n message:\n \"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. \" +\n \"Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\",\n },\n optional: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n sourceMapName: {\n message:\n \"The `sourceMapName` option has been removed because it makes more sense for the \" +\n \"tooling that calls Babel to assign `map.file` themselves.\",\n },\n stage: {\n message:\n \"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\",\n },\n whitelist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n\n resolveModuleSource: {\n version: 6,\n message: \"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\",\n },\n metadata: {\n version: 6,\n message:\n \"Generated plugin metadata is always included in the output result\",\n },\n sourceMapTarget: {\n version: 6,\n message:\n \"The `sourceMapTarget` option has been removed because it makes more sense for the tooling \" +\n \"that calls Babel to assign `map.file` themselves.\",\n },\n} as { [name: string]: { version?: number; message: string } };\n"],"mappings":";;;;;;eAAe;EACbA,gBAAgB,EAAE;IAChBC,OAAO,EAAE;EACX,CAAC;EACDC,SAAS,EAAE;IACTD,OAAO,EAAE;EACX,CAAC;EACDE,WAAW,EAAE;IACXF,OAAO,EAAE;EACX,CAAC;EACDG,YAAY,EAAE;IACZH,OAAO,EAAE;EACX,CAAC;EACDI,eAAe,EAAE;IACfJ,OAAO,EACL,6CAA6C,GAC7C;EACJ,CAAC;EACDK,KAAK,EAAE;IACLL,OAAO,EAAE;EACX,CAAC;EACDM,SAAS,EAAE;IACTN,OAAO,EACL,qDAAqD,GACrD;EACJ,CAAC;EACDO,KAAK,EAAE;IACLP,OAAO,EACL,mEAAmE,GACnE;EACJ,CAAC;EACDQ,mBAAmB,EAAE;IACnBR,OAAO,EAAE;EACX,CAAC;EACDS,OAAO,EAAE;IACPT,OAAO,EACL,yEAAyE,GACzE;EACJ,CAAC;EACDU,WAAW,EAAE;IACXV,OAAO,EACL,8EAA8E,GAC9E;EACJ,CAAC;EACDW,QAAQ,EAAE;IACRX,OAAO,EAAE;EACX,CAAC;EACDY,aAAa,EAAE;IACbZ,OAAO,EACL,kFAAkF,GAClF;EACJ,CAAC;EACDa,KAAK,EAAE;IACLb,OAAO,EACL;EACJ,CAAC;EACDc,SAAS,EAAE;IACTd,OAAO,EAAE;EACX,CAAC;EAEDe,mBAAmB,EAAE;IACnBC,OAAO,EAAE,CAAC;IACVhB,OAAO,EAAE;EACX,CAAC;EACDiB,QAAQ,EAAE;IACRD,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL;EACJ,CAAC;EACDkB,eAAe,EAAE;IACfF,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL,4FAA4F,GAC5F;EACJ;AACF,CAAC;AAAAmB,OAAA,CAAAC,OAAA,GAAAC,QAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/errors/config-error.js b/node_modules/@babel/core/lib/errors/config-error.js index 1ee56a883..7390a06ab 100644 --- a/node_modules/@babel/core/lib/errors/config-error.js +++ b/node_modules/@babel/core/lib/errors/config-error.js @@ -9,7 +9,7 @@ class ConfigError extends Error { constructor(message, filename) { super(message); (0, _rewriteStackTrace.expectedError)(this); - if (filename) (0, _rewriteStackTrace.injcectVirtualStackFrame)(this, filename); + if (filename) (0, _rewriteStackTrace.injectVirtualStackFrame)(this, filename); } } exports.default = ConfigError; diff --git a/node_modules/@babel/core/lib/errors/config-error.js.map b/node_modules/@babel/core/lib/errors/config-error.js.map index 3aaf90ab5..5d32c4e82 100644 --- a/node_modules/@babel/core/lib/errors/config-error.js.map +++ b/node_modules/@babel/core/lib/errors/config-error.js.map @@ -1 +1 @@ -{"version":3,"names":["ConfigError","Error","constructor","message","filename","expectedError","injcectVirtualStackFrame"],"sources":["../../src/errors/config-error.ts"],"sourcesContent":["import { injcectVirtualStackFrame, expectedError } from \"./rewrite-stack-trace\";\n\nexport default class ConfigError extends Error {\n constructor(message: string, filename?: string) {\n super(message);\n expectedError(this);\n if (filename) injcectVirtualStackFrame(this, filename);\n }\n}\n"],"mappings":";;;;;;AAAA;AAEe,MAAMA,WAAW,SAASC,KAAK,CAAC;EAC7CC,WAAW,CAACC,OAAe,EAAEC,QAAiB,EAAE;IAC9C,KAAK,CAACD,OAAO,CAAC;IACd,IAAAE,gCAAa,EAAC,IAAI,CAAC;IACnB,IAAID,QAAQ,EAAE,IAAAE,2CAAwB,EAAC,IAAI,EAAEF,QAAQ,CAAC;EACxD;AACF;AAAC;AAAA"} \ No newline at end of file +{"version":3,"names":["_rewriteStackTrace","require","ConfigError","Error","constructor","message","filename","expectedError","injectVirtualStackFrame","exports","default"],"sources":["../../src/errors/config-error.ts"],"sourcesContent":["import { injectVirtualStackFrame, expectedError } from \"./rewrite-stack-trace\";\n\nexport default class ConfigError extends Error {\n constructor(message: string, filename?: string) {\n super(message);\n expectedError(this);\n if (filename) injectVirtualStackFrame(this, filename);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEe,MAAMC,WAAW,SAASC,KAAK,CAAC;EAC7CC,WAAWA,CAACC,OAAe,EAAEC,QAAiB,EAAE;IAC9C,KAAK,CAACD,OAAO,CAAC;IACd,IAAAE,gCAAa,EAAC,IAAI,CAAC;IACnB,IAAID,QAAQ,EAAE,IAAAE,0CAAuB,EAAC,IAAI,EAAEF,QAAQ,CAAC;EACvD;AACF;AAACG,OAAA,CAAAC,OAAA,GAAAR,WAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js index 4a7711ff6..9b6ce01e8 100644 --- a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +++ b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js @@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { exports.beginHiddenCallStack = beginHiddenCallStack; exports.endHiddenCallStack = endHiddenCallStack; exports.expectedError = expectedError; -exports.injcectVirtualStackFrame = injcectVirtualStackFrame; +exports.injectVirtualStackFrame = injectVirtualStackFrame; const ErrorToString = Function.call.bind(Error.prototype.toString); const SUPPORTED = !!Error.captureStackTrace; -const START_HIDNG = "startHiding - secret - don't use this - v1"; -const STOP_HIDNG = "stopHiding - secret - don't use this - v1"; +const START_HIDING = "startHiding - secret - don't use this - v1"; +const STOP_HIDING = "stopHiding - secret - don't use this - v1"; const expectedErrors = new WeakSet(); const virtualFrames = new WeakMap(); function CallSite(filename) { @@ -27,7 +27,7 @@ function CallSite(filename) { toString: () => filename }); } -function injcectVirtualStackFrame(error, filename) { +function injectVirtualStackFrame(error, filename) { if (!SUPPORTED) return; let frames = virtualFrames.get(error); if (!frames) virtualFrames.set(error, frames = []); @@ -45,7 +45,7 @@ function beginHiddenCallStack(fn) { setupPrepareStackTrace(); return fn(...args); }, "name", { - value: STOP_HIDNG + value: STOP_HIDING }); } function endHiddenCallStack(fn) { @@ -53,7 +53,7 @@ function endHiddenCallStack(fn) { return Object.defineProperty(function (...args) { return fn(...args); }, "name", { - value: START_HIDNG + value: START_HIDING }); } function setupPrepareStackTrace() { @@ -69,9 +69,9 @@ function setupPrepareStackTrace() { let status = isExpected ? "hiding" : "unknown"; for (let i = 0; i < trace.length; i++) { const name = trace[i].getFunctionName(); - if (name === START_HIDNG) { + if (name === START_HIDING) { status = "hiding"; - } else if (name === STOP_HIDNG) { + } else if (name === STOP_HIDING) { if (status === "hiding") { status = "showing"; if (virtualFrames.has(err)) { diff --git a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map index 8ed6352cb..fa8adaf9a 100644 --- a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map +++ b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map @@ -1 +1 @@ -{"version":3,"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","START_HIDNG","STOP_HIDNG","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","Object","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injcectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the iternal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injcectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injcectVirtualStackFrame(err, \"h\") and\n * injcectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED = !!Error.captureStackTrace;\n\nconst START_HIDNG = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDNG = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = Parameters[1][number];\n\nconst expectedErrors = new WeakSet();\nconst virtualFrames = new WeakMap();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injcectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDNG },\n );\n}\n\nexport function endHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDNG },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n // eslint-disable-next-line no-func-assign\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDNG) {\n status = \"hiding\";\n } else if (name === STOP_HIDNG) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err));\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n"],"mappings":";;;;;;;;;AA4CA,MAAMA,aAAa,GAAGC,QAAQ,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC;AAElE,MAAMC,SAAS,GAAG,CAAC,CAACH,KAAK,CAACI,iBAAiB;AAE3C,MAAMC,WAAW,GAAG,4CAA4C;AAChE,MAAMC,UAAU,GAAG,2CAA2C;AAI9D,MAAMC,cAAc,GAAG,IAAIC,OAAO,EAAS;AAC3C,MAAMC,aAAa,GAAG,IAAIC,OAA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C,GAAG/C,aAAa,CAACmB,GAAG,CAACmB,GAAG,CAAC,CAAC;UAC7C;QACF,CAAC,MAAM,IAAIK,MAAM,KAAK,SAAS,EAAE;UAE/BH,QAAQ,GAAGD,KAAK;UAChB;QACF;MACF,CAAC,MAAM,IAAII,MAAM,KAAK,QAAQ,EAAE;QAC9BH,QAAQ,CAACnB,IAAI,CAACkB,KAAK,CAACK,CAAC,CAAC,CAAC;MACzB;IACF;IAEA,OAAOb,iBAAiB,CAACO,GAAG,EAAEE,QAAQ,CAAC;EACzC,CAAC;AACH;AAEA,SAASR,wBAAwB,CAACM,GAAU,EAAEC,KAAiB,EAAE;EAC/D,IAAIA,KAAK,CAACM,MAAM,KAAK,CAAC,EAAE,OAAO1D,aAAa,CAACmD,GAAG,CAAC;EACjD,OAAQ,GAAEnD,aAAa,CAACmD,GAAG,CAAE,YAAWC,KAAK,CAACS,IAAI,CAAC,WAAW,CAAE,EAAC;AACnE;AAAC"} \ No newline at end of file +{"version":3,"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","START_HIDING","STOP_HIDING","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","Object","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED = !!Error.captureStackTrace;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = Parameters[1][number];\n\nconst expectedErrors = new WeakSet();\nconst virtualFrames = new WeakMap();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n // eslint-disable-next-line no-func-assign\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err));\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n"],"mappings":";;;;;;;;;AA4CA,MAAMA,aAAa,GAAGC,QAAQ,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC;AAElE,MAAMC,SAAS,GAAG,CAAC,CAACH,KAAK,CAACI,iBAAiB;AAE3C,MAAMC,YAAY,GAAG,4CAA4C;AACjE,MAAMC,WAAW,GAAG,2CAA2C;AAI/D,MAAMC,cAAc,GAAG,IAAIC,OAAO,EAAS;AAC3C,MAAMC,aAAa,GAAG,IAAIC,OAAO,EAAqB;AAEtD,SAASC,QAAQA,CAACC,QAAgB,EAAY;EAE5C,OAAOC,MAAM,CAACC,MAAM,CAAC;IACnBC,QAAQ,EAAEA,CAAA,KAAM,KAAK;IACrBC,aAAa,EAAEA,CAAA,KAAM,KAAK;IAC1BC,UAAU,EAAEA,CAAA,KAAM,IAAI;IACtBC,WAAW,EAAEA,CAAA,KAAMN,QAAQ;IAC3BO,aAAa,EAAEA,CAAA,KAAMC,SAAS;IAC9BC,eAAe,EAAEA,CAAA,KAAMD,SAAS;IAChCE,eAAe,EAAEA,CAAA,KAAMF,SAAS;IAChCG,aAAa,EAAEA,CAAA,KAAMH,SAAS;IAC9BI,WAAW,EAAEA,CAAA,KAAMJ,SAAS;IAC5BlB,QAAQ,EAAEA,CAAA,KAAMU;EAClB,CAAC,CAAa;AAChB;AAEO,SAASa,u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,KAAK,CAAC,EAAE,OAAO1D,aAAa,CAACmD,GAAG,CAAC;EACjD,OAAQ,GAAEnD,aAAa,CAACmD,GAAG,CAAE,YAAWC,KAAK,CAACS,IAAI,CAAC,WAAW,CAAE,EAAC;AACnE;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js.map b/node_modules/@babel/core/lib/gensync-utils/async.js.map index e9d237771..2687bb5cd 100644 --- a/node_modules/@babel/core/lib/gensync-utils/async.js.map +++ b/node_modules/@babel/core/lib/gensync-utils/async.js.map @@ -1 +1 @@ -{"version":3,"names":["runGenerator","gensync","item","isAsync","sync","errback","cb","maybeAsync","fn","message","args","result","apply","isThenable","Error","async","Promise","resolve","withKind","forwardAsync","action","g","kind","adapted","onFirstPause","name","arity","firstPause","completed","err","value","waitFor","x","val","then"],"sources":["../../src/gensync-utils/async.ts"],"sourcesContent":["import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise = T | Promise;\n\nconst runGenerator: {\n sync(gen: Handler): Return;\n async(gen: Handler): Promise;\n errback(gen: Handler, cb: Callback): void;\n} = gensync(function* (item: Handler): Handler {\n return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n sync: () => false,\n errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync(\n fn: (...args: Args) => Return,\n message: string,\n): Gensync {\n return gensync({\n sync(...args) {\n const result = fn.apply(this, args);\n if (isThenable(result)) throw new Error(message);\n return result;\n },\n async(...args) {\n return Promise.resolve(fn.apply(this, args));\n },\n });\n}\n\nconst withKind = gensync({\n sync: cb => cb(\"sync\"),\n async: async cb => cb(\"async\"),\n}) as (cb: (kind: \"sync\" | \"async\") => MaybePromise) => Handler;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n// yield* forwardAsync(gensyncFn, wrappedFn =>\n// cache.using(x => {\n// // Here we don't know about gensync. wrappedFn is a\n// // normal sync or async function\n// return wrappedFn(x);\n// })\n// )\nexport function forwardAsync(\n action: (...args: Args) => Handler,\n cb: (\n adapted: (...args: Args) => MaybePromise,\n ) => MaybePromise,\n): Handler {\n const g = gensync(action);\n return withKind(kind => {\n const adapted = g[kind];\n return cb(adapted);\n });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n [gen: Handler, firstPause: () => void],\n unknown\n>({\n name: \"onFirstPause\",\n arity: 2,\n sync: function (item) {\n return runGenerator.sync(item);\n },\n errback: function (item, firstPause, cb) {\n let completed = false;\n\n runGenerator.errback(item, (err, value) => {\n completed = true;\n cb(err, value);\n });\n\n if (!completed) {\n firstPause();\n }\n },\n}) as (gen: Handler, firstPause: () => void) => Handler;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n sync: x => x,\n async: async x => x,\n}) as (p: T | Promise) => Handler;\n\nexport function isThenable(val: any): val is PromiseLike {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA6E;AAAA;AAI7E,MAAMA,YAIL,GAAGC,UAAO,CAAC,WAAWC,IAAkB,EAAgB;EACvD,OAAO,OAAOA,IAAI;AACpB,CAAC,CAAC;AAIK,MAAMC,OAAO,GAAGF,UAAO,CAAC;EAC7BG,IAAI,EAAE,MAAM,KAAK;EACjBC,OAAO,EAA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UAAUH,IAAI,EAAEyB,UAAU,EAAErB,EAAE,EAAE;IACvC,IAAIsB,SAAS,GAAG,KAAK;IAErB5B,YAAY,CAACK,OAAO,CAACH,IAAI,EAAE,CAAC2B,GAAG,EAAEC,KAAK,KAAK;MACzCF,SAAS,GAAG,IAAI;MAChBtB,EAAE,CAACuB,GAAG,EAAEC,KAAK,CAAC;IAChB,CAAC,CAAC;IAEF,IAAI,CAACF,SAAS,EAAE;MACdD,UAAU,EAAE;IACd;EACF;AACF,CAAC,CAA+D;AAAC;AAG1D,MAAMI,OAAO,GAAG9B,UAAO,CAAC;EAC7BG,IAAI,EAAE4B,CAAC,IAAIA,CAAC;EACZjB,KAAK;IAAA,8BAAE,WAAMiB,CAAC;MAAA,OAAIA,CAAC;IAAA;IAAA;MAAA;IAAA;EAAA;AACrB,CAAC,CAAyC;AAAC;AAEpC,SAASnB,UAAU,CAAUoB,GAAQ,EAAyB;EACnE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACC,IAAI,IACV,OAAOD,GAAG,CAACC,IAAI,KAAK,UAAU;AAElC;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","runGenerator","gensync","item","isAsync","sync","errback","cb","exports","maybeAsync","message","result","isThenable","Error","async","withKind","_ref","_x","forwardAsync","action","g","kind","adapted","onFirstPause","name","arity","firstPause","completed","waitFor","x","_ref2","_x2","val"],"sources":["../../src/gensync-utils/async.ts"],"sourcesContent":["import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise = T | Promise;\n\nconst runGenerator: {\n sync(gen: Handler): Return;\n async(gen: Handler): Promise;\n errback(gen: Handler, cb: Callback): void;\n} = gensync(function* (item: Handler): Handler {\n return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n sync: () => false,\n errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync(\n fn: (...args: Args) => Return,\n message: string,\n): Gensync {\n return gensync({\n sync(...args) {\n const result = fn.apply(this, args);\n if (isThenable(result)) throw new Error(message);\n return result;\n },\n async(...args) {\n return Promise.resolve(fn.apply(this, args));\n },\n });\n}\n\nconst withKind = gensync({\n sync: cb => cb(\"sync\"),\n async: async cb => cb(\"async\"),\n}) as (cb: (kind: \"sync\" | \"async\") => MaybePromise) => Handler;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n// yield* forwardAsync(gensyncFn, wrappedFn =>\n// cache.using(x => {\n// // Here we don't know about gensync. wrappedFn is a\n// // normal sync or async function\n// return wrappedFn(x);\n// })\n// )\nexport function forwardAsync(\n action: (...args: Args) => Handler,\n cb: (\n adapted: (...args: Args) => MaybePromise,\n ) => MaybePromise,\n): Handler {\n const g = gensync(action);\n return withKind(kind => {\n const adapted = g[kind];\n return cb(adapted);\n });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n [gen: Handler, firstPause: () => void],\n unknown\n>({\n name: \"onFirstPause\",\n arity: 2,\n sync: function (item) {\n return runGenerator.sync(item);\n },\n errback: function (item, firstPause, cb) {\n let completed = false;\n\n runGenerator.errback(item, (err, value) => {\n completed = true;\n cb(err, value);\n });\n\n if (!completed) {\n firstPause();\n }\n },\n}) as (gen: Handler, firstPause: () => void) => Handler;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n sync: x => x,\n async: async x => x,\n}) as (p: T | Promise) => Handler;\n\nexport function isThenable(val: any): val is PromiseLike {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,SAAAE,mBAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,GAAA,EAAAC,GAAA,cAAAC,IAAA,GAAAP,GAAA,CAAAK,GAAA,EAAAC,GAAA,OAAAE,KAAA,GAAAD,IAAA,CAAAC,KAAA,WAAAC,KAAA,IAAAP,MAAA,CAAAO,KAAA,iBAAAF,IAAA,CAAAG,IAAA,IAAAT,OAAA,CAAAO,KAAA,YAAAG,OAAA,CAAAV,OAAA,CAAAO,KAAA,EAAAI,IAAA,CAAAT,KAAA,EAAAC,MAAA;AAAA,SAAAS,kBAAAC,EAAA,6BAAAC,IAAA,SAAAC,IAAA,GAAAC,SAAA,aAAAN,OAAA,WAAAV,OAAA,EAAAC,MAAA,QAAAF,GAAA,GAAAc,EAAA,CAAAI,KAAA,CAAAH,IAAA,EAAAC,IAAA,YAAAb,MAAAK,KAAA,IAAAT,kBAAA,CAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,UAAAI,KAAA,cAAAJ,OAAAe,GAAA,IAAApB,kBAAA,CAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,WAAAe,GAAA,KAAAhB,KAAA,CAAAiB,SAAA;AAI7E,MAAMC,YAIL,GAAGC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AAElC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js.map b/node_modules/@babel/core/lib/gensync-utils/fs.js.map index 788a14fa6..656058339 100644 --- a/node_modules/@babel/core/lib/gensync-utils/fs.js.map +++ b/node_modules/@babel/core/lib/gensync-utils/fs.js.map @@ -1 +1 @@ -{"version":3,"names":["readFile","gensync","sync","fs","readFileSync","errback","stat","statSync"],"sources":["../../src/gensync-utils/fs.ts"],"sourcesContent":["import fs from \"fs\";\nimport gensync from \"gensync\";\n\nexport const readFile = gensync<[filepath: string, encoding: \"utf8\"], string>({\n sync: fs.readFileSync,\n errback: fs.readFile,\n});\n\nexport const stat = gensync({\n sync: fs.statSync,\n errback: fs.stat,\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,QAAQ,GAAGC,UAAO,CAA+C;EAC5EC,IAAI,EAAEC,KAAE,CAACC,YAAY;EACrBC,OAAO,EAAEF,KAAE,CAACH;AACd,CAAC,CAAC;AAAC;AAEI,MAAMM,IAAI,GAAGL,UAAO,CAAC;EAC1BC,IAAI,EAAEC,KAAE,CAACI,QAAQ;EACjBF,OAAO,EAAEF,KAAE,CAACG;AACd,CAAC,CAAC;AAAC;AAAA"} \ No newline at end of file +{"version":3,"names":["_fs","data","require","_gensync","readFile","gensync","sync","fs","readFileSync","errback","exports","stat","statSync"],"sources":["../../src/gensync-utils/fs.ts"],"sourcesContent":["import fs from \"fs\";\nimport gensync from \"gensync\";\n\nexport const readFile = gensync<[filepath: string, encoding: \"utf8\"], string>({\n sync: fs.readFileSync,\n errback: fs.readFile,\n});\n\nexport const stat = gensync({\n sync: fs.statSync,\n errback: fs.stat,\n});\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,QAAQ,GAAGC,UAAO,CAA+C;EAC5EC,IAAI,EAAEC,KAAE,CAACC,YAAY;EACrBC,OAAO,EAAEF,KAAE,CAACH;AACd,CAAC,CAAC;AAACM,OAAA,CAAAN,QAAA,GAAAA,QAAA;AAEI,MAAMO,IAAI,GAAGN,UAAO,CAAC;EAC1BC,IAAI,EAAEC,KAAE,CAACK,QAAQ;EACjBH,OAAO,EAAEF,KAAE,CAACI;AACd,CAAC,CAAC;AAACD,OAAA,CAAAC,IAAA,GAAAA,IAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/functional.js.map b/node_modules/@babel/core/lib/gensync-utils/functional.js.map index cfa6ed024..df66d16f3 100644 --- a/node_modules/@babel/core/lib/gensync-utils/functional.js.map +++ b/node_modules/@babel/core/lib/gensync-utils/functional.js.map @@ -1 +1 @@ -{"version":3,"names":["once","fn","result","resultP","isAsync","waitFor","resolve","reject","Promise","res","rej","error"],"sources":["../../src/gensync-utils/functional.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async\";\n\nexport function once(fn: () => Handler): () => Handler {\n let result: R;\n let resultP: Promise;\n return function* () {\n if (result) return result;\n if (!(yield* isAsync())) return (result = yield* fn());\n if (resultP) return yield* waitFor(resultP);\n\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = yield* fn();\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n resolve(result);\n return result;\n } catch (error) {\n reject(error);\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;AAEA;AAEO,SAASA,IAAI,CAAIC,EAAoB,EAAoB;EAC9D,IAAIC,MAAS;EACb,IAAIC,OAAmB;EACvB,OAAO,aAAa;IAClB,IAAID,MAAM,EAAE,OAAOA,MAAM;IACzB,IAAI,EAAE,OAAO,IAAAE,cAAO,GAAE,CAAC,EAAE,OAAQF,MAAM,GAAG,OAAOD,EAAE,EAAE;IACrD,IAAIE,OAAO,EAAE,OAAO,OAAO,IAAAE,cAAO,EAACF,OAAO,CAAC;IAE3C,IAAIG,OAA4B,EAAEC,MAAgC;IAClEJ,OAAO,GAAG,IAAIK,OAAO,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;MAClCJ,OAAO,GAAGG,GAAG;MACbF,MAAM,GAAGG,GAAG;IACd,CAAC,CAAC;IAEF,IAAI;MACFR,MAAM,GAAG,OAAOD,EAAE,EAAE;MAGpBE,OAAO,GAAG,IAAI;MACdG,OAAO,CAACJ,MAAM,CAAC;MACf,OAAOA,MAAM;IACf,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb,MAAMA,KAAK;IACb;EACF,CAAC;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["_async","require","once","fn","result","resultP","isAsync","waitFor","resolve","reject","Promise","res","rej","error"],"sources":["../../src/gensync-utils/functional.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async\";\n\nexport function once(fn: () => Handler): () => Handler {\n let result: R;\n let resultP: Promise;\n return function* () {\n if (result) return result;\n if (!(yield* isAsync())) return (result = yield* fn());\n if (resultP) return yield* waitFor(resultP);\n\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = yield* fn();\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n resolve(result);\n return result;\n } catch (error) {\n reject(error);\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,IAAIA,CAAIC,EAAoB,EAAoB;EAC9D,IAAIC,MAAS;EACb,IAAIC,OAAmB;EACvB,OAAO,aAAa;IAClB,IAAID,MAAM,EAAE,OAAOA,MAAM;IACzB,IAAI,EAAE,OAAO,IAAAE,cAAO,GAAE,CAAC,EAAE,OAAQF,MAAM,GAAG,OAAOD,EAAE,EAAE;IACrD,IAAIE,OAAO,EAAE,OAAO,OAAO,IAAAE,cAAO,EAACF,OAAO,CAAC;IAE3C,IAAIG,OAA4B,EAAEC,MAAgC;IAClEJ,OAAO,GAAG,IAAIK,OAAO,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;MAClCJ,OAAO,GAAGG,GAAG;MACbF,MAAM,GAAGG,GAAG;IACd,CAAC,CAAC;IAEF,IAAI;MACFR,MAAM,GAAG,OAAOD,EAAE,EAAE;MAGpBE,OAAO,GAAG,IAAI;MACdG,OAAO,CAACJ,MAAM,CAAC;MACf,OAAOA,MAAM;IACf,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb,MAAMA,KAAK;IACb;EACF,CAAC;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/index.js b/node_modules/@babel/core/lib/index.js index 25720fe74..888f8a8c8 100644 --- a/node_modules/@babel/core/lib/index.js +++ b/node_modules/@babel/core/lib/index.js @@ -224,7 +224,8 @@ var _transform = require("./transform"); var _transformFile = require("./transform-file"); var _transformAst = require("./transform-ast"); var _parse = require("./parse"); -const version = "7.20.12"; +var thisFile = require("./index"); +const version = "7.21.3"; exports.version = version; const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]); exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; @@ -237,6 +238,7 @@ exports.OptionManager = OptionManager; function Plugin(alias) { throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`); } +; 0 && (exports.types = exports.traverse = exports.tokTypes = exports.template = 0); //# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/index.js.map b/node_modules/@babel/core/lib/index.js.map index 138347318..f1bd4c773 100644 --- a/node_modules/@babel/core/lib/index.js.map +++ b/node_modules/@babel/core/lib/index.js.map @@ -1 +1 @@ -{"version":3,"names":["version","DEFAULT_EXTENSIONS","Object","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error"],"sources":["../src/index.ts"],"sourcesContent":["declare const PACKAGE_JSON: { name: string; version: string };\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers\";\nexport { resolvePlugin, resolvePreset } from \"./config/files\";\n\nexport { getEnv } from \"./config/helpers/environment\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\nexport {\n createConfigItem,\n createConfigItemSync,\n createConfigItemAsync,\n} from \"./config\";\n\nexport {\n loadPartialConfig,\n loadPartialConfigSync,\n loadPartialConfigAsync,\n loadOptions,\n loadOptionsSync,\n loadOptionsAsync,\n} from \"./config\";\n\nexport type {\n CallerMetadata,\n InputOptions,\n PluginAPI,\n PluginObject,\n PresetAPI,\n PresetObject,\n} from \"./config\";\n\nexport {\n transform,\n transformSync,\n transformAsync,\n type FileResult,\n} from \"./transform\";\nexport {\n transformFile,\n transformFileSync,\n transformFileAsync,\n} from \"./transform-file\";\nexport {\n transformFromAst,\n transformFromAstSync,\n transformFromAstAsync,\n} from \"./transform-ast\";\nexport { parse, parseSync, parseAsync } from \"./parse\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\n// For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\nimport { loadOptionsSync } from \"./config\";\nexport class OptionManager {\n init(opts: {}) {\n return loadOptionsSync(opts);\n }\n}\n\nexport function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AAEA;AACA;AAEA;AAAsD;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAA;EAAA;EAAA;IAAA;EAAA;AAAA;AAMtD;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAwBA;AAMA;AAKA;AAKA;AAzDO,MAAMA,OAAO,YAAuB;AAAC;AA+DrC,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,MAAM,CAAC,CAC9C,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,CACP,CAAU;AAAC;AAIL,MAAMC,aAAa,CAAC;EACzBC,IAAI,CAACC,IAAQ,EAAE;IACb,OAAO,IAAAC,uBAAe,EAACD,IAAI,CAAC;EAC9B;AACF;AAAC;AAEM,SAASE,MAAM,CAACC,KAAa,EAAE;EACpC,MAAM,IAAIC,KAAK,CACZ,QAAOD,KAAM,kEAAiE,CAChF;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["_file","require","_buildExternalHelpers","_files","_environment","_types","data","Object","defineProperty","exports","enumerable","get","_parser","_traverse","_template","_config","_transform","_transformFile","_transformAst","_parse","thisFile","version","DEFAULT_EXTENSIONS","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error","types","traverse","tokTypes","template"],"sources":["../src/index.ts"],"sourcesContent":["declare const PACKAGE_JSON: { name: string; version: string };\ndeclare const USE_ESM: boolean, IS_STANDALONE: boolean;\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers\";\nexport { resolvePlugin, resolvePreset } from \"./config/files\";\n\nexport { getEnv } from \"./config/helpers/environment\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\nexport {\n createConfigItem,\n createConfigItemSync,\n createConfigItemAsync,\n} from \"./config\";\n\nexport {\n loadPartialConfig,\n loadPartialConfigSync,\n loadPartialConfigAsync,\n loadOptions,\n loadOptionsSync,\n loadOptionsAsync,\n} from \"./config\";\n\nexport type {\n CallerMetadata,\n InputOptions,\n PluginAPI,\n PluginObject,\n PresetAPI,\n PresetObject,\n} from \"./config\";\n\nexport {\n transform,\n transformSync,\n transformAsync,\n type FileResult,\n} from \"./transform\";\nexport {\n transformFile,\n transformFileSync,\n transformFileAsync,\n} from \"./transform-file\";\nexport {\n transformFromAst,\n transformFromAstSync,\n transformFromAstAsync,\n} from \"./transform-ast\";\nexport { parse, parseSync, parseAsync } from \"./parse\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\n// For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n// TODO(Babel 8): Remove this.\nimport { loadOptionsSync } from \"./config\";\nexport class OptionManager {\n init(opts: {}) {\n return loadOptionsSync(opts);\n }\n}\n\n// TODO(Babel 8): Remove this.\nexport function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n}\n\nimport Module from \"module\";\nimport * as thisFile from \"./index\";\nif (USE_ESM) {\n if (!IS_STANDALONE) {\n // Pass this module to the CJS proxy, so that it can be synchronously accessed.\n const cjsProxy = Module.createRequire(import.meta.url)(\"../cjs-proxy.cjs\");\n cjsProxy[\"__ initialize @babel/core cjs proxy __\"] = thisFile;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAAsD,SAAAI,OAAA;EAAA,MAAAC,IAAA,GAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAAC,MAAA,CAAAC,cAAA,KAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA;EAAA;AAAA;AAMtD,SAAAO,QAAA;EAAA,MAAAN,IAAA,GAAAL,OAAA;EAAAW,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAL,OAAA;EAAAY,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAL,OAAA;EAAAa,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAS,OAAA,GAAAd,OAAA;AAwBA,IAAAe,UAAA,GAAAf,OAAA;AAMA,IAAAgB,cAAA,GAAAhB,OAAA;AAKA,IAAAiB,aAAA,GAAAjB,OAAA;AAKA,IAAAkB,MAAA,GAAAlB,OAAA;AAgCA,IAAAmB,QAAA,GAAAnB,OAAA;AAzFO,MAAMoB,OAAO,WAAuB;AAACZ,OAAA,CAAAY,OAAA,GAAAA,OAAA;AA+DrC,MAAMC,kBAAkB,GAAGf,MAAM,CAACgB,MAAM,CAAC,CAC9C,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,CACP,CAAU;AAACd,OAAA,CAAAa,kBAAA,GAAAA,kBAAA;AAKL,MAAME,aAAa,CAAC;EACzBC,IAAIA,CAACC,IAAQ,EAAE;IACb,OAAO,IAAAC,uBAAe,EAACD,IAAI,CAAC;EAC9B;AACF;AAACjB,OAAA,CAAAe,aAAA,GAAAA,aAAA;AAGM,SAASI,MAAMA,CAACC,KAAa,EAAE;EACpC,MAAM,IAAIC,KAAK,CACZ,QAAOD,KAAM,kEAAiE,CAChF;AACH;AAAC;AAAA,MAAApB,OAAA,CAAAsB,KAAA,GAAAtB,OAAA,CAAAuB,QAAA,GAAAvB,OAAA,CAAAwB,QAAA,GAAAxB,OAAA,CAAAyB,QAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parse.js.map b/node_modules/@babel/core/lib/parse.js.map index f22369678..9a79b15d5 100644 --- a/node_modules/@babel/core/lib/parse.js.map +++ b/node_modules/@babel/core/lib/parse.js.map @@ -1 +1 @@ -{"version":3,"names":["parseRunner","gensync","parse","code","opts","config","loadConfig","parser","passes","normalizeOptions","callback","undefined","beginHiddenCallStack","sync","errback","parseSync","args","parseAsync","async"],"sources":["../src/parse.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions } from \"./config\";\nimport parser from \"./parser\";\nimport type { ParseResult } from \"./parser\";\nimport normalizeOptions from \"./transformation/normalize-opts\";\nimport type { ValidatedOptions } from \"./config/validation/options\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\ntype FileParseCallback = {\n (err: Error, ast: null): void;\n (err: null, ast: ParseResult | null): void;\n};\n\ntype Parse = {\n (code: string, callback: FileParseCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileParseCallback,\n ): void;\n (code: string, opts?: InputOptions | null): ParseResult | null;\n};\n\nconst parseRunner = gensync(function* parse(\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config = yield* loadConfig(opts);\n\n if (config === null) {\n return null;\n }\n\n return yield* parser(config.passes, normalizeOptions(config), code);\n});\n\nexport const parse: Parse = function parse(\n code,\n opts?,\n callback?: FileParseCallback,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n opts = undefined as ValidatedOptions;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'parse' function expects a callback. If you need to call it synchronously, please use 'parseSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'parse' function will expect a callback. If you need to call it synchronously, please use 'parseSync'.\",\n // );\n return beginHiddenCallStack(parseRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(parseRunner.errback)(code, opts, callback);\n};\n\nexport function parseSync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.sync)(...args);\n}\nexport function parseAsync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAEA;AAEA;AAGA;AAiBA,MAAMA,WAAW,GAAGC,UAAO,CAAC,UAAUC,KAAK,CACzCC,IAAY,EACZC,IAAqC,EACR;EAC7B,MAAMC,MAAM,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAEtC,IAAIC,MAAM,KAAK,IAAI,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,OAAO,OAAO,IAAAE,eAAM,EAACF,MAAM,CAACG,MAAM,EAAE,IAAAC,sBAAgB,EAACJ,MAAM,CAAC,EAAEF,IAAI,CAAC;AACrE,CAAC,CAAC;AAEK,MAAMD,KAAY,GAAG,SAASA,KAAK,CACxCC,IAAI,EACJC,IAAK,EACLM,QAA4B,EAC5B;EACA,IAAI,OAAON,IAAI,KAAK,UAAU,EAAE;IAC9BM,QAAQ,GAAGN,IAAI;IACfA,IAAI,GAAGO,SAA6B;EACtC;EAEA,IAAID,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACZ,WAAW,CAACa,IAAI,CAAC,CAACV,IAAI,EAAEC,IAAI,CAAC;IAC3D;EACF;EAEA,IAAAQ,uCAAoB,EAACZ,WAAW,CAACc,OAAO,CAAC,CAACX,IAAI,EAAEC,IAAI,EAAEM,QAAQ,CAAC;AACjE,CAAC;AAAC;AAEK,SAASK,SAAS,CAAC,GAAGC,IAAyC,EAAE;EACtE,OAAO,IAAAJ,uCAAoB,EAACZ,WAAW,CAACa,IAAI,CAAC,CAAC,GAAGG,IAAI,CAAC;AACxD;AACO,SAASC,UAAU,CAAC,GAAGD,IAA0C,EAAE;EACxE,OAAO,IAAAJ,uCAAoB,EAACZ,WAAW,CAACkB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACzD;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_config","_parser","_normalizeOpts","_rewriteStackTrace","parseRunner","gensync","parse","code","opts","config","loadConfig","parser","passes","normalizeOptions","callback","undefined","beginHiddenCallStack","sync","errback","exports","parseSync","args","parseAsync","async"],"sources":["../src/parse.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions } from \"./config\";\nimport parser from \"./parser\";\nimport type { ParseResult } from \"./parser\";\nimport normalizeOptions from \"./transformation/normalize-opts\";\nimport type { ValidatedOptions } from \"./config/validation/options\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\ntype FileParseCallback = {\n (err: Error, ast: null): void;\n (err: null, ast: ParseResult | null): void;\n};\n\ntype Parse = {\n (code: string, callback: FileParseCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileParseCallback,\n ): void;\n (code: string, opts?: InputOptions | null): ParseResult | null;\n};\n\nconst parseRunner = gensync(function* parse(\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config = yield* loadConfig(opts);\n\n if (config === null) {\n return null;\n }\n\n return yield* parser(config.passes, normalizeOptions(config), code);\n});\n\nexport const parse: Parse = function parse(\n code,\n opts?,\n callback?: FileParseCallback,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n opts = undefined as ValidatedOptions;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'parse' function expects a callback. If you need to call it synchronously, please use 'parseSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'parse' function will expect a callback. If you need to call it synchronously, please use 'parseSync'.\",\n // );\n return beginHiddenCallStack(parseRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(parseRunner.errback)(code, opts, callback);\n};\n\nexport function parseSync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.sync)(...args);\n}\nexport function parseAsync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,Y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AACZ,WAAW,CAACmB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACzD;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/index.js.map b/node_modules/@babel/core/lib/parser/index.js.map index 39e495375..b97ecca08 100644 --- a/node_modules/@babel/core/lib/parser/index.js.map +++ b/node_modules/@babel/core/lib/parser/index.js.map @@ -1 +1 @@ -{"version":3,"names":["parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper\";\nimport type { PluginPasses } from \"../config\";\n\nexport type ParseResult = ReturnType;\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n code: string,\n): Handler {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // @ts-expect-error - If we want to allow async parsers\n yield* [];\n if (typeof results[0].then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(missingPlugin[0], loc, codeFrame);\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAKe,UAAUA,MAAM,CAC7BC,YAA0B,EAC1B;EAAEC,UAAU;EAAEC,aAAa,GAAG,IAAI;EAAEC,QAAQ,GAAG;AAAe,CAAC,EAC/DC,IAAY,EACU;EACtB,IAAI;IACF,MAAMC,OAAO,GAAG,EAAE;IAClB,KAAK,MAAMC,OAAO,IAAIN,YAAY,EAAE;MAClC,KAAK,MAAMO,MAAM,IAAID,OAAO,EAAE;QAC5B,MAAM;UAAEE;QAAe,CAAC,GAAGD,MAAM;QACjC,IAAIC,cAAc,EAAE;UAClB,MAAMC,GAAG,GAAGD,cAAc,CAACJ,IAAI,EAAEH,UAAU,EAAES,eAAK,CAAC;UAEnD,IAAID,GAAG,KAAKE,SAAS,EAAEN,OAAO,CAACO,IAAI,CAACH,GAAG,CAAC;QAC1C;MACF;IACF;IAEA,IAAIJ,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MACxB,OAAO,IAAAH,eAAK,EAACN,IAAI,EAAEH,UAAU,CAAC;IAChC,CAAC,MAAM,IAAII,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MAE/B,OAAO,EAAE;MACT,IAAI,OAAOR,OAAO,CAAC,CAAC,CAAC,CAACS,IAAI,KAAK,UAAU,EAAE;QACzC,MAAM,IAAIC,KAAK,CACZ,iDAAgD,GAC9C,wDAAuD,GACvD,8DAA6D,GAC7D,2BAA0B,CAC9B;MACH;MACA,OAAOV,OAAO,CAAC,CAAC,CAAC;IACnB;IAEA,MAAM,IAAIU,KAAK,CAAC,qDAAqD,CAAC;EACxE,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACZ,IAAI,KAAK,yCAAyC,EAAE;MAC1DY,GAAG,CAACC,OAAO,IACT,uEAAuE,GACvE,+DAA+D;IAEnE;IAEA,MAAM;MAAEC,GAAG;MAAEC;IAAc,CAAC,GAAGH,GAAG;IAClC,IAAIE,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCjB,IAAI,EACJ;QACEkB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEtB;MACF,CAAC,CACF;MACD,IAAIiB,aAAa,EAAE;QACjBH,GAAG,CAACC,OAAO,GACR,GAAEd,QAAS,IAAG,GACf,IAAAsB,4BAA4B,EAACN,aAAa,CAAC,CAAC,CAAC,EAAED,GAAG,EAAEE,SAAS,CAAC;MAClE,CAAC,MAAM;QACLJ,GAAG,CAACC,OAAO,GAAI,GAAEd,QAAS,KAAIa,GAAG,CAACC,OAAQ,MAAK,GAAGG,SAAS;MAC7D;MACAJ,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper\";\nimport type { PluginPasses } from \"../config\";\n\nexport type ParseResult = ReturnType;\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n code: string,\n): Handler {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // @ts-expect-error - If we want to allow async parsers\n yield* [];\n if (typeof results[0].then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(missingPlugin[0], loc, codeFrame);\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,M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EnE;IAEA,MAAM;MAAEC,GAAG;MAAEC;IAAc,CAAC,GAAGH,GAAG;IAClC,IAAIE,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCjB,IAAI,EACJ;QACEkB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEtB;MACF,CAAC,CACF;MACD,IAAIiB,aAAa,EAAE;QACjBH,GAAG,CAACC,OAAO,GACR,GAAEd,QAAS,IAAG,GACf,IAAAsB,4BAA4B,EAACN,aAAa,CAAC,CAAC,CAAC,EAAED,GAAG,EAAEE,SAAS,CAAC;MAClE,CAAC,MAAM;QACLJ,GAAG,CAACC,OAAO,GAAI,GAAEd,QAAS,KAAIa,GAAG,CAACC,OAAQ,MAAK,GAAGG,SAAS;MAC7D;MACAJ,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map index eed5e7840..ac4f7496b 100644 --- a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map +++ b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map @@ -1 +1 @@ -{"version":3,"names":["pluginNameMap","asyncDoExpressions","syntax","name","url","decimal","decorators","transform","doExpressions","exportDefaultFrom","flow","functionBind","functionSent","jsx","importAssertions","pipelineOperator","recordAndTuple","regexpUnicodeSets","throwExpressions","typescript","asyncGenerators","classProperties","classPrivateProperties","classPrivateMethods","classStaticBlock","dynamicImport","exportNamespaceFrom","importMeta","logicalAssignment","moduleStringNames","numericSeparator","nullishCoalescingOperator","objectRestSpread","optionalCatchBinding","optionalChaining","privateIn","getNameURLCombination","generateMissingPluginMessage","missingPluginName","loc","codeFrame","helpMessage","line","column","pluginInfo","syntaxPlugin","transformPlugin","syntaxPluginInfo","transformPluginInfo","sectionType","startsWith"],"sources":["../../../src/parser/util/missing-plugin-helper.ts"],"sourcesContent":["const pluginNameMap: Record<\n string,\n Partial>>\n> = {\n asyncDoExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-async-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n },\n },\n decimal: {\n syntax: {\n name: \"@babel/plugin-syntax-decimal\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n },\n },\n decorators: {\n syntax: {\n name: \"@babel/plugin-syntax-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n },\n },\n doExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n },\n },\n exportDefaultFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n },\n },\n flow: {\n syntax: {\n name: \"@babel/plugin-syntax-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n },\n transform: {\n name: \"@babel/preset-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n },\n },\n functionBind: {\n syntax: {\n name: \"@babel/plugin-syntax-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n },\n },\n functionSent: {\n syntax: {\n name: \"@babel/plugin-syntax-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n },\n },\n jsx: {\n syntax: {\n name: \"@babel/plugin-syntax-jsx\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n },\n transform: {\n name: \"@babel/preset-react\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n },\n },\n importAssertions: {\n syntax: {\n name: \"@babel/plugin-syntax-import-assertions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n },\n },\n pipelineOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n },\n },\n recordAndTuple: {\n syntax: {\n name: \"@babel/plugin-syntax-record-and-tuple\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n },\n },\n regexpUnicodeSets: {\n syntax: {\n name: \"@babel/plugin-syntax-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n },\n transform: {\n name: \"@babel/plugin-proposal-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n },\n },\n throwExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n },\n },\n typescript: {\n syntax: {\n name: \"@babel/plugin-syntax-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n },\n transform: {\n name: \"@babel/preset-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n },\n },\n\n // TODO: This plugins are now supported by default by @babel/parser: they can\n // be removed from this list. Although removing them isn't a breaking change,\n // it's better to keep a nice error message for users using older versions of\n // the parser. They can be removed in Babel 8.\n asyncGenerators: {\n syntax: {\n name: \"@babel/plugin-syntax-async-generators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-async-generator-functions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-async-generator-functions\",\n },\n },\n classProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-proposal-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-class-properties\",\n },\n },\n classPrivateProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-proposal-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-class-properties\",\n },\n },\n classPrivateMethods: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-proposal-private-methods\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-private-methods\",\n },\n },\n classStaticBlock: {\n syntax: {\n name: \"@babel/plugin-syntax-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n },\n transform: {\n name: \"@babel/plugin-proposal-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-static-block\",\n },\n },\n dynamicImport: {\n syntax: {\n name: \"@babel/plugin-syntax-dynamic-import\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n },\n },\n exportNamespaceFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-namespace-from\",\n },\n },\n importMeta: {\n syntax: {\n name: \"@babel/plugin-syntax-import-meta\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n },\n },\n logicalAssignment: {\n syntax: {\n name: \"@babel/plugin-syntax-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-logical-assignment-operators\",\n },\n },\n moduleStringNames: {\n syntax: {\n name: \"@babel/plugin-syntax-module-string-names\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n },\n },\n numericSeparator: {\n syntax: {\n name: \"@babel/plugin-syntax-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-numeric-separator\",\n },\n },\n nullishCoalescingOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n },\n },\n objectRestSpread: {\n syntax: {\n name: \"@babel/plugin-syntax-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n },\n transform: {\n name: \"@babel/plugin-proposal-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-object-rest-spread\",\n },\n },\n optionalCatchBinding: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n },\n transform: {\n name: \"@babel/plugin-proposal-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-optional-catch-binding\",\n },\n },\n optionalChaining: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n },\n transform: {\n name: \"@babel/plugin-proposal-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-optional-chaining\",\n },\n },\n privateIn: {\n syntax: {\n name: \"@babel/plugin-syntax-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n },\n transform: {\n name: \"@babel/plugin-proposal-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-private-property-in-object\",\n },\n },\n};\n\n//todo: we don't have plugin-syntax-private-property-in-object\npluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform;\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n missingPluginName: string,\n loc: {\n line: number;\n column: number;\n },\n codeFrame: string,\n): string {\n let helpMessage =\n `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n `(${loc.line}:${loc.column + 1}):\\n\\n` +\n codeFrame;\n const pluginInfo = pluginNameMap[missingPluginName];\n if (pluginInfo) {\n const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n if (syntaxPlugin) {\n const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n if (transformPlugin) {\n const transformPluginInfo = getNameURLCombination(transformPlugin);\n const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n ? \"plugins\"\n : \"presets\";\n helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n } else {\n helpMessage +=\n `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n `to enable parsing.`;\n }\n }\n }\n return helpMessage;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAGL,GAAG;EACFC,kBAAkB,EAAE;IAClBC,MAAM,EAAE;MACNC,IAAI,EAAE,2CAA2C;MACjDC,GAAG,EAAE;IACP;EACF,CAAC;EACDC,OAAO,EAAE;IACPH,MAAM,EAAE;MACNC,IAAI,EAAE,8BAA8B;MACpCC,GAAG,EAAE;IACP;EACF,CAAC;EACDE,UAAU,EAAE;IACVJ,MAAM,EAAE;MACNC,IAAI,EAAE,iCAAiC;MACvCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,mCAAmC;MACzCC,GAAG,EAAE;IACP;EACF,CAAC;EACDI,aAAa,EAAE;IACbN,MAAM,EAAE;MACNC,IAAI,EAAE,q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AE,QAAO,GACtCH,SAAS;EACX,MAAMI,UAAU,GAAG5C,aAAa,CAACsC,iBAAiB,CAAC;EACnD,IAAIM,UAAU,EAAE;IACd,MAAM;MAAE1C,MAAM,EAAE2C,YAAY;MAAEtC,SAAS,EAAEuC;IAAgB,CAAC,GAAGF,UAAU;IACvE,IAAIC,YAAY,EAAE;MAChB,MAAME,gBAAgB,GAAGX,qBAAqB,CAACS,YAAY,CAAC;MAC5D,IAAIC,eAAe,EAAE;QACnB,MAAME,mBAAmB,GAAGZ,qBAAqB,CAACU,eAAe,CAAC;QAClE,MAAMG,WAAW,GAAGH,eAAe,CAAC3C,IAAI,CAAC+C,UAAU,CAAC,eAAe,CAAC,GAChE,SAAS,GACT,SAAS;QACbT,WAAW,IAAK,WAAUO,mBAAoB,YAAWC,WAAY;AAC7E,qCAAqCF,gBAAiB,8CAA6C;MAC7F,CAAC,MAAM;QACLN,WAAW,IACR,WAAUM,gBAAiB,iDAAgD,GAC3E,oBAAmB;MACxB;IACF;EACF;EACA,OAAON,WAAW;AACpB;AAAC"} \ No newline at end of file +{"version":3,"names":["pluginNameMap","asyncDoExpressions","syntax","name","url","decimal","decorators","transform","doExpressions","exportDefaultFrom","flow","functionBind","functionSent","jsx","importAssertions","pipelineOperator","recordAndTuple","regexpUnicodeSets","throwExpressions","typescript","asyncGenerators","classProperties","classPrivateProperties","classPrivateMethods","classStaticBlock","dynamicImport","exportNamespaceFrom","importMeta","logicalAssignment","moduleStringNames","numericSeparator","nullishCoalescingOperator","objectRestSpread","optionalCatchBinding","optionalChaining","privateIn","getNameURLCombination","generateMissingPluginMessage","missingPluginName","loc","codeFrame","helpMessage","line","column","pluginInfo","syntaxPlugin","transformPlugin","syntaxPluginInfo","transformPluginInfo","sectionType","startsWith"],"sources":["../../../src/parser/util/missing-plugin-helper.ts"],"sourcesContent":["const pluginNameMap: Record<\n string,\n Partial>>\n> = {\n asyncDoExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-async-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n },\n },\n decimal: {\n syntax: {\n name: \"@babel/plugin-syntax-decimal\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n },\n },\n decorators: {\n syntax: {\n name: \"@babel/plugin-syntax-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n },\n },\n doExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n },\n },\n exportDefaultFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n },\n },\n flow: {\n syntax: {\n name: \"@babel/plugin-syntax-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n },\n transform: {\n name: \"@babel/preset-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n },\n },\n functionBind: {\n syntax: {\n name: \"@babel/plugin-syntax-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n },\n },\n functionSent: {\n syntax: {\n name: \"@babel/plugin-syntax-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n },\n },\n jsx: {\n syntax: {\n name: \"@babel/plugin-syntax-jsx\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n },\n transform: {\n name: \"@babel/preset-react\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n },\n },\n importAssertions: {\n syntax: {\n name: \"@babel/plugin-syntax-import-assertions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n },\n },\n pipelineOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n },\n },\n recordAndTuple: {\n syntax: {\n name: \"@babel/plugin-syntax-record-and-tuple\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n },\n },\n regexpUnicodeSets: {\n syntax: {\n name: \"@babel/plugin-syntax-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n },\n transform: {\n name: \"@babel/plugin-proposal-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n },\n },\n throwExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n },\n },\n typescript: {\n syntax: {\n name: \"@babel/plugin-syntax-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n },\n transform: {\n name: \"@babel/preset-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n },\n },\n\n // TODO: This plugins are now supported by default by @babel/parser: they can\n // be removed from this list. Although removing them isn't a breaking change,\n // it's better to keep a nice error message for users using older versions of\n // the parser. They can be removed in Babel 8.\n asyncGenerators: {\n syntax: {\n name: \"@babel/plugin-syntax-async-generators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-async-generator-functions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-async-generator-functions\",\n },\n },\n classProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-proposal-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-class-properties\",\n },\n },\n classPrivateProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-proposal-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-class-properties\",\n },\n },\n classPrivateMethods: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-proposal-private-methods\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-private-methods\",\n },\n },\n classStaticBlock: {\n syntax: {\n name: \"@babel/plugin-syntax-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n },\n transform: {\n name: \"@babel/plugin-proposal-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-static-block\",\n },\n },\n dynamicImport: {\n syntax: {\n name: \"@babel/plugin-syntax-dynamic-import\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n },\n },\n exportNamespaceFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-namespace-from\",\n },\n },\n importMeta: {\n syntax: {\n name: \"@babel/plugin-syntax-import-meta\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n },\n },\n logicalAssignment: {\n syntax: {\n name: \"@babel/plugin-syntax-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-logical-assignment-operators\",\n },\n },\n moduleStringNames: {\n syntax: {\n name: \"@babel/plugin-syntax-module-string-names\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n },\n },\n numericSeparator: {\n syntax: {\n name: \"@babel/plugin-syntax-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-numeric-separator\",\n },\n },\n nullishCoalescingOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n },\n },\n objectRestSpread: {\n syntax: {\n name: \"@babel/plugin-syntax-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n },\n transform: {\n name: \"@babel/plugin-proposal-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-object-rest-spread\",\n },\n },\n optionalCatchBinding: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n },\n transform: {\n name: \"@babel/plugin-proposal-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-optional-catch-binding\",\n },\n },\n optionalChaining: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n },\n transform: {\n name: \"@babel/plugin-proposal-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-optional-chaining\",\n },\n },\n privateIn: {\n syntax: {\n name: \"@babel/plugin-syntax-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n },\n transform: {\n name: \"@babel/plugin-proposal-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-private-property-in-object\",\n },\n },\n};\n\n//todo: we don't have plugin-syntax-private-property-in-object\npluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform;\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n missingPluginName: string,\n loc: {\n line: number;\n column: number;\n },\n codeFrame: string,\n): string {\n let helpMessage =\n `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n `(${loc.line}:${loc.column + 1}):\\n\\n` +\n codeFrame;\n const pluginInfo = pluginNameMap[missingPluginName];\n if (pluginInfo) {\n const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n if (syntaxPlugin) {\n const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n if (transformPlugin) {\n const transformPluginInfo = getNameURLCombination(transformPlugin);\n const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n ? \"plugins\"\n : \"presets\";\n helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n } else {\n helpMessage +=\n `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n `to enable parsing.`;\n }\n }\n }\n return helpMessage;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAGL,GAAG;EACFC,kBAAkB,EAAE;IAClBC,MAAM,EAAE;MACNC,IAAI,EAAE,2CAA2C;MACjDC,GAAG,EAAE;IACP;EACF,CAAC;EACDC,OAAO,EAAE;IACPH,MAAM,EAAE;MACNC,IAAI,EAAE,8BAA8B;MACpCC,GAAG,EAAE;IACP;EACF,CAAC;EACDE,UAAU,EAAE;IACVJ,MAAM,EAAE;MACNC,IAAI,EAAE,iCAAiC;MACvCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,mCAAmC;MACzCC,GAAG,EAAE;IACP;EACF,CAAC;EACDI,aAAa,EAAE;IACbN,MAAM,EAAE;MACNC,IAAI,EAAE,qCAAqC;MAC3CC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,uCAAuC;MAC7CC,GAAG,EAAE;IACP;EACF,CAAC;EACDK,iBAAiB,EAAE;IACjBP,MAAM,EAAE;MACNC,IAAI,EAAE,0CAA0C;MAChDC,GAAG,E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AAIC,YAAY,EAAE;MAChB,MAAME,gBAAgB,GAAGX,qBAAqB,CAACS,YAAY,CAAC;MAC5D,IAAIC,eAAe,EAAE;QACnB,MAAME,mBAAmB,GAAGZ,qBAAqB,CAACU,eAAe,CAAC;QAClE,MAAMG,WAAW,GAAGH,eAAe,CAAC3C,IAAI,CAAC+C,UAAU,CAAC,eAAe,CAAC,GAChE,SAAS,GACT,SAAS;QACbT,WAAW,IAAK,WAAUO,mBAAoB,YAAWC,WAAY;AAC7E,qCAAqCF,gBAAiB,8CAA6C;MAC7F,CAAC,MAAM;QACLN,WAAW,IACR,WAAUM,gBAAiB,iDAAgD,GAC3E,oBAAmB;MACxB;IACF;EACF;EACA,OAAON,WAAW;AACpB;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js.map b/node_modules/@babel/core/lib/tools/build-external-helpers.js.map index fddcc5d7b..49f517717 100644 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js.map +++ b/node_modules/@babel/core/lib/tools/build-external-helpers.js.map @@ -1 +1 @@ -{"version":3,"names":["arrayExpression","assignmentExpression","binaryExpression","blockStatement","callExpression","cloneNode","conditionalExpression","exportNamedDeclaration","exportSpecifier","expressionStatement","functionExpression","identifier","memberExpression","objectExpression","program","stringLiteral","unaryExpression","variableDeclaration","variableDeclarator","buildUmdWrapper","replacements","template","statement","buildGlobal","allowlist","namespace","body","container","tree","push","buildHelpers","buildModule","refs","unshift","Object","keys","map","name","buildUmd","FACTORY_PARAMETERS","BROWSER_ARGUMENTS","COMMON_ARGUMENTS","AMD_ARGUMENTS","FACTORY_BODY","UMD_ROOT","buildVar","getHelperReference","helpers","list","forEach","indexOf","ref","ensure","File","nodes","get","outputType","build","global","module","umd","var","Error","generator","code"],"sources":["../../src/tools/build-external-helpers.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport generator from \"@babel/generator\";\nimport template from \"@babel/template\";\nimport {\n arrayExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n cloneNode,\n conditionalExpression,\n exportNamedDeclaration,\n exportSpecifier,\n expressionStatement,\n functionExpression,\n identifier,\n memberExpression,\n objectExpression,\n program,\n stringLiteral,\n unaryExpression,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport File from \"../transformation/file/file\";\nimport type { PublicReplacements } from \"@babel/template/src/options\";\n\n// Wrapped to avoid wasting time parsing this when almost no-one uses\n// build-external-helpers.\nconst buildUmdWrapper = (replacements: PublicReplacements) =>\n template.statement`\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n `(replacements);\n\nfunction buildGlobal(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n const container = functionExpression(\n null,\n [identifier(\"global\")],\n blockStatement(body),\n );\n const tree = program([\n expressionStatement(\n callExpression(container, [\n // typeof global === \"undefined\" ? self : global\n conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", identifier(\"global\")),\n stringLiteral(\"undefined\"),\n ),\n identifier(\"self\"),\n identifier(\"global\"),\n ),\n ]),\n ),\n ]);\n\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(\n namespace,\n assignmentExpression(\n \"=\",\n memberExpression(identifier(\"global\"), namespace),\n objectExpression([]),\n ),\n ),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return tree;\n}\n\nfunction buildModule(allowlist?: Array) {\n const body: t.Statement[] = [];\n const refs = buildHelpers(body, null, allowlist);\n\n body.unshift(\n exportNamedDeclaration(\n null,\n Object.keys(refs).map(name => {\n return exportSpecifier(cloneNode(refs[name]), identifier(name));\n }),\n ),\n );\n\n return program(body, [], \"module\");\n}\n\nfunction buildUmd(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, identifier(\"global\")),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return program([\n buildUmdWrapper({\n FACTORY_PARAMETERS: identifier(\"global\"),\n BROWSER_ARGUMENTS: assignmentExpression(\n \"=\",\n memberExpression(identifier(\"root\"), namespace),\n objectExpression([]),\n ),\n COMMON_ARGUMENTS: identifier(\"exports\"),\n AMD_ARGUMENTS: arrayExpression([stringLiteral(\"exports\")]),\n FACTORY_BODY: body,\n UMD_ROOT: identifier(\"this\"),\n }),\n ]);\n}\n\nfunction buildVar(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, objectExpression([])),\n ]),\n );\n const tree = program(body);\n buildHelpers(body, namespace, allowlist);\n body.push(expressionStatement(namespace));\n return tree;\n}\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression,\n allowlist?: Array,\n): Record;\nfunction buildHelpers(\n body: t.Statement[],\n namespace: null,\n allowlist?: Array,\n): Record;\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression | null,\n allowlist?: Array,\n) {\n const getHelperReference = (name: string) => {\n return namespace\n ? memberExpression(namespace, identifier(name))\n : identifier(`_${name}`);\n };\n\n const refs: { [key: string]: t.Identifier | t.MemberExpression } = {};\n helpers.list.forEach(function (name) {\n if (allowlist && allowlist.indexOf(name) < 0) return;\n\n const ref = (refs[name] = getHelperReference(name));\n\n helpers.ensure(name, File);\n const { nodes } = helpers.get(name, getHelperReference, ref);\n\n body.push(...nodes);\n });\n return refs;\n}\nexport default function (\n allowlist?: Array,\n outputType: \"global\" | \"module\" | \"umd\" | \"var\" = \"global\",\n) {\n let tree: t.Program;\n\n const build = {\n global: buildGlobal,\n module: buildModule,\n umd: buildUmd,\n var: buildVar,\n }[outputType];\n\n if (build) {\n tree = build(allowlist);\n } else {\n throw new Error(`Unsupported output type ${outputType}`);\n }\n\n return generator(tree).code;\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAsBA;AAA+C;EArB7CA,eAAe;EACfC,oBAAoB;EACpBC,gBAAgB;EAChBC,cAAc;EACdC,cAAc;EACdC,SAAS;EACTC,qBAAqB;EACrBC,sBAAsB;EACtBC,eAAe;EACfC,mBAAmB;EACnBC,kBAAkB;EAClBC,UAAU;EACVC,gBAAgB;EAChBC,gBAAgB;EAChBC,OAAO;EACPC,aAAa;EACbC,eAAe;EACfC,mBAAmB;EACnBC;AAAkB;AAQpB,MAAMC,eAAe,GAAIC,YAAgC,IACvDC,mBAAQ,CAACC,SAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAACF,YAAY,CAAC;AAEjB,SAASG,WAAW,CAACC,SAAyB,EAAE;EAC9C,MAAMC,SAAS,GAAGd,UAAU,CAAC,cAAc,CAAC;EAE5C,MAAMe,IAAmB,GAAG,EAAE;EAC9B,MAAMC,SAAS,GAAGjB,kBAAkB,CAClC,IAAI,EACJ,CAACC,UAAU,CAAC,QAAQ,CAAC,CAAC,EACtBR,cAAc,CAACuB,IAAI,CAAC,CACrB;EACD,MAAME,IAAI,GAAGd,OAAO,CAAC,CACnBL,mBAAmB,CACjBL,cAAc,CAACuB,SAAS,EAAE,CAExBrB,qBAAqB,CACnBJ,gBAAgB,CACd,KAAK,EACLc,eAAe,CAAC,QAAQ,EAAEL,UAAU,CAAC,QAAQ,CAAC,CAAC,EAC/CI,aAAa,CAAC,WAAW,CAAC,CAC3B,EACDJ,UAAU,CAAC,MAAM,CAAC,EAClB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AACC,OAAO,CAAC,UAAUZ,IAAI,EAAE;IACnC,IAAIb,SAAS,IAAIA,SAAS,CAAC0B,OAAO,CAACb,IAAI,CAAC,GAAG,CAAC,EAAE;IAE9C,MAAMc,GAAG,GAAInB,IAAI,CAACK,IAAI,CAAC,GAAGS,kBAAkB,CAACT,IAAI,CAAE;IAEnDU,OAAO,GAACK,MAAM,CAACf,IAAI,EAAEgB,aAAI,CAAC;IAC1B,MAAM;MAAEC;IAAM,CAAC,GAAGP,OAAO,GAACQ,GAAG,CAAClB,IAAI,EAAES,kBAAkB,EAAEK,GAAG,CAAC;IAE5DzB,IAAI,CAACG,IAAI,CAAC,GAAGyB,KAAK,CAAC;EACrB,CAAC,CAAC;EACF,OAAOtB,IAAI;AACb;AACe,kBACbR,SAAyB,EACzBgC,UAA+C,GAAG,QAAQ,EAC1D;EACA,IAAI5B,IAAe;EAEnB,MAAM6B,KAAK,GAAG;IACZC,MAAM,EAAEnC,WAAW;IACnBoC,MAAM,EAAE5B,WAAW;IACnB6B,GAAG,EAAEtB,QAAQ;IACbuB,GAAG,EAAEhB;EACP,CAAC,CAACW,UAAU,CAAC;EAEb,IAAIC,KAAK,EAAE;IACT7B,IAAI,GAAG6B,KAAK,CAACjC,SAAS,CAAC;EACzB,CAAC,MAAM;IACL,MAAM,IAAIsC,KAAK,CAAE,2BAA0BN,UAAW,EAAC,CAAC;EAC1D;EAEA,OAAO,IAAAO,oBAAS,EAACnC,IAAI,CAAC,CAACoC,IAAI;AAC7B;AAAC"} \ No newline at end of file +{"version":3,"names":["helpers","data","require","_generator","_template","_t","_file","arrayExpression","assignmentExpression","binaryExpression","blockStatement","callExpression","cloneNode","conditionalExpression","exportNamedDeclaration","exportSpecifier","expressionStatement","functionExpression","identifier","memberExpression","objectExpression","program","stringLiteral","unaryExpression","variableDeclaration","variableDeclarator","buildUmdWrapper","replacements","template","statement","buildGlobal","allowlist","namespace","body","container","tree","push","buildHelpers","buildModule","refs","unshift","Object","keys","map","name","buildUmd","FACTORY_PARAMETERS","BROWSER_ARGUMENTS","COMMON_ARGUMENTS","AMD_ARGUMENTS","FACTORY_BODY","UMD_ROOT","buildVar","getHelperReference","list","forEach","indexOf","ref","ensure","File","nodes","get","_default","outputType","build","global","module","umd","var","Error","generator","code"],"sources":["../../src/tools/build-external-helpers.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport generator from \"@babel/generator\";\nimport template from \"@babel/template\";\nimport {\n arrayExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n cloneNode,\n conditionalExpression,\n exportNamedDeclaration,\n exportSpecifier,\n expressionStatement,\n functionExpression,\n identifier,\n memberExpression,\n objectExpression,\n program,\n stringLiteral,\n unaryExpression,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport File from \"../transformation/file/file\";\nimport type { PublicReplacements } from \"@babel/template/src/options\";\n\n// Wrapped to avoid wasting time parsing this when almost no-one uses\n// build-external-helpers.\nconst buildUmdWrapper = (replacements: PublicReplacements) =>\n template.statement`\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n `(replacements);\n\nfunction buildGlobal(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n const container = functionExpression(\n null,\n [identifier(\"global\")],\n blockStatement(body),\n );\n const tree = program([\n expressionStatement(\n callExpression(container, [\n // typeof global === \"undefined\" ? self : global\n conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", identifier(\"global\")),\n stringLiteral(\"undefined\"),\n ),\n identifier(\"self\"),\n identifier(\"global\"),\n ),\n ]),\n ),\n ]);\n\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(\n namespace,\n assignmentExpression(\n \"=\",\n memberExpression(identifier(\"global\"), namespace),\n objectExpression([]),\n ),\n ),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return tree;\n}\n\nfunction buildModule(allowlist?: Array) {\n const body: t.Statement[] = [];\n const refs = buildHelpers(body, null, allowlist);\n\n body.unshift(\n exportNamedDeclaration(\n null,\n Object.keys(refs).map(name => {\n return exportSpecifier(cloneNode(refs[name]), identifier(name));\n }),\n ),\n );\n\n return program(body, [], \"module\");\n}\n\nfunction buildUmd(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, identifier(\"global\")),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return program([\n buildUmdWrapper({\n FACTORY_PARAMETERS: identifier(\"global\"),\n BROWSER_ARGUMENTS: assignmentExpression(\n \"=\",\n memberExpression(identifier(\"root\"), namespace),\n objectExpression([]),\n ),\n COMMON_ARGUMENTS: identifier(\"exports\"),\n AMD_ARGUMENTS: arrayExpression([stringLiteral(\"exports\")]),\n FACTORY_BODY: body,\n UMD_ROOT: identifier(\"this\"),\n }),\n ]);\n}\n\nfunction buildVar(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, objectExpression([])),\n ]),\n );\n const tree = program(body);\n buildHelpers(body, namespace, allowlist);\n body.push(expressionStatement(namespace));\n return tree;\n}\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression,\n allowlist?: Array,\n): Record;\nfunction buildHelpers(\n body: t.Statement[],\n namespace: null,\n allowlist?: Array,\n): Record;\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression | null,\n allowlist?: Array,\n) {\n const getHelperReference = (name: string) => {\n return namespace\n ? memberExpression(namespace, identifier(name))\n : identifier(`_${name}`);\n };\n\n const refs: { [key: string]: t.Identifier | t.MemberExpression } = {};\n helpers.list.forEach(function (name) {\n if (allowlist && allowlist.indexOf(name) < 0) return;\n\n const ref = (refs[name] = getHelperReference(name));\n\n helpers.ensure(name, File);\n const { nodes } = helpers.get(name, getHelperReference, ref);\n\n body.push(...nodes);\n });\n return refs;\n}\nexport default function (\n allowlist?: Array,\n outputType: \"global\" | \"module\" | \"umd\" | \"var\" = \"global\",\n) {\n let tree: t.Program;\n\n const build = {\n global: buildGlobal,\n module: buildModule,\n umd: buildUmd,\n var: buildVar,\n }[outputType];\n\n if (build) {\n tree = build(allowlist);\n } else {\n throw new Error(`Unsupported output type ${outputType}`);\n }\n\n return generator(tree).code;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,GAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,EAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAsBA,IAAAK,KAAA,GAAAJ,OAAA;AAA+C;EArB7CK,eAAe;EACfC,oBAAoB;EACpBC,gBAAgB;EAChBC,cAAc;EACdC,cAAc;EACdC,SAAS;EACTC,qBAAqB;EACrBC,sBAAsB;EACtBC,eAAe;EACfC,mBAAmB;EACnBC,kBAAkB;EAClBC,UAAU;EACVC,gBAAgB;EAChBC,gBAAgB;EAChBC,OAAO;EACPC,aAAa;EACbC,eAAe;EACfC,mBAAm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,EAC1D;EACA,IAAI5B,IAAe;EAEnB,MAAM6B,KAAK,GAAG;IACZC,MAAM,EAAEnC,WAAW;IACnBoC,MAAM,EAAE5B,WAAW;IACnB6B,GAAG,EAAEtB,QAAQ;IACbuB,GAAG,EAAEhB;EACP,CAAC,CAACW,UAAU,CAAC;EAEb,IAAIC,KAAK,EAAE;IACT7B,IAAI,GAAG6B,KAAK,CAACjC,SAAS,CAAC;EACzB,CAAC,MAAM;IACL,MAAM,IAAIsC,KAAK,CAAE,2BAA0BN,UAAW,EAAC,CAAC;EAC1D;EAEA,OAAO,IAAAO,oBAAS,EAACnC,IAAI,CAAC,CAACoC,IAAI;AAC7B;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-ast.js.map b/node_modules/@babel/core/lib/transform-ast.js.map index e4297a106..09dca7124 100644 --- a/node_modules/@babel/core/lib/transform-ast.js.map +++ b/node_modules/@babel/core/lib/transform-ast.js.map @@ -1 +1 @@ -{"version":3,"names":["transformFromAstRunner","gensync","ast","code","opts","config","loadConfig","Error","run","transformFromAst","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","transformFromAstSync","args","transformFromAstAsync","async"],"sources":["../src/transform-ast.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\nimport type * as t from \"@babel/types\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation\";\ntype AstRoot = t.File | t.Program;\n\ntype TransformFromAst = {\n (ast: AstRoot, code: string, callback: FileResultCallback): void;\n (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (ast: AstRoot, code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformFromAstRunner = gensync(function* (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n if (!ast) throw new Error(\"No AST given\");\n\n return yield* run(config, code, ast);\n});\n\nexport const transformFromAst: TransformFromAst = function transformFromAst(\n ast,\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transformFromAst' function expects a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transformFromAst' function will expect a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n // );\n return beginHiddenCallStack(transformFromAstRunner.sync)(ast, code, opts);\n }\n }\n\n beginHiddenCallStack(transformFromAstRunner.errback)(\n ast,\n code,\n opts,\n callback,\n );\n};\n\nexport function transformFromAstSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.sync)(...args);\n}\n\nexport function transformFromAstAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAEA;AAGA;AAgBA,MAAMA,sBAAsB,GAAGC,UAAO,CAAC,WACrCC,GAAY,EACZC,IAAY,EACZC,IAAqC,EACT;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,IAAI,CAACH,GAAG,EAAE,MAAM,IAAIK,KAAK,CAAC,cAAc,CAAC;EAEzC,OAAO,OAAO,IAAAC,mBAAG,EAACH,MAAM,EAAEF,IAAI,EAAED,GAAG,CAAC;AACtC,CAAC,CAAC;AAEK,MAAMO,gBAAkC,GAAG,SAASA,gBAAgB,CACzEP,GAAG,EACHC,IAAI,EACJO,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIP,IAAqC;EACzC,IAAIQ,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBN,IAAI,GAAGS,SAAS;EAClB,CAAC,MAAM;IACLT,IAAI,GAAGM,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACd,sBAAsB,CAACe,IAAI,CAAC,CAACb,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;IAC3E;EACF;EAEA,IAAAU,uCAAoB,EAACd,sBAAsB,CAACgB,OAAO,CAAC,CAClDd,GAAG,EACHC,IAAI,EACJC,IAAI,EACJQ,QAAQ,CACT;AACH,CAAC;AAAC;AAEK,SAASK,oBAAoB,CAClC,GAAGC,IAAoD,EACvD;EACA,OAAO,IAAAJ,uCAAoB,EAACd,sBAAsB,CAACe,IAAI,CAAC,CAAC,GAAGG,IAAI,CAAC;AACnE;AAEO,SAASC,qBAAqB,CACnC,GAAGD,IAAqD,EACxD;EACA,OAAO,IAAAJ,uCAAoB,EAACd,sBAAsB,CAACoB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACpE;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_config","_transformation","_rewriteStackTrace","transformFromAstRunner","gensync","ast","code","opts","config","loadConfig","Error","run","transformFromAst","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","exports","transformFromAstSync","args","transformFromAstAsync","async"],"sources":["../src/transform-ast.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\nimport type * as t from \"@babel/types\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation\";\ntype AstRoot = t.File | t.Program;\n\ntype TransformFromAst = {\n (ast: AstRoot, code: string, callback: FileResultCallback): void;\n (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (ast: AstRoot, code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformFromAstRunner = gensync(function* (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n if (!ast) throw new Error(\"No AST given\");\n\n return yield* run(config, code, ast);\n});\n\nexport const transformFromAst: TransformFromAst = function transformFromAst(\n ast,\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transformFromAst' function expects a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transformFromAst' function will expect a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n // );\n return beginHiddenCallStack(transformFromAstRunner.sync)(ast, code, opts);\n }\n }\n\n beginHiddenCallStack(transformFromAstRunner.errback)(\n ast,\n code,\n opts,\n callback,\n );\n};\n\nexport function transformFromAstSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.sync)(...args);\n}\n\nexport function transformFromAstAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(trans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H,CAAC;AAACK,OAAA,CAAAR,gBAAA,GAAAA,gBAAA;AAEK,SAASS,oBAAoBA,CAClC,GAAGC,IAAoD,EACvD;EACA,OAAO,IAAAL,uCAAoB,EAACd,sBAAsB,CAACe,IAAI,CAAC,CAAC,GAAGI,IAAI,CAAC;AACnE;AAEO,SAASC,qBAAqBA,CACnC,GAAGD,IAAqD,EACxD;EACA,OAAO,IAAAL,uCAAoB,EAACd,sBAAsB,CAACqB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACpE;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file-browser.js.map b/node_modules/@babel/core/lib/transform-file-browser.js.map index 17a5cfc1e..e24820f92 100644 --- a/node_modules/@babel/core/lib/transform-file-browser.js.map +++ b/node_modules/@babel/core/lib/transform-file-browser.js.map @@ -1 +1 @@ -{"version":3,"names":["transformFile","filename","opts","callback","Error","transformFileSync","transformFileAsync","Promise","reject"],"sources":["../src/transform-file-browser.ts"],"sourcesContent":["// duplicated from transform-file so we do not have to import anything here\ntype TransformFile = {\n (filename: string, callback: (error: Error, file: null) => void): void;\n (\n filename: string,\n opts: any,\n callback: (error: Error, file: null) => void,\n ): void;\n};\n\nexport const transformFile: TransformFile = function transformFile(\n filename,\n opts,\n callback?: (error: Error, file: null) => void,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n }\n\n callback(new Error(\"Transforming files is not supported in browsers\"), null);\n};\n\nexport function transformFileSync(): never {\n throw new Error(\"Transforming files is not supported in browsers\");\n}\n\nexport function transformFileAsync() {\n return Promise.reject(\n new Error(\"Transforming files is not supported in browsers\"),\n );\n}\n"],"mappings":";;;;;;;;AAUO,MAAMA,aAA4B,GAAG,SAASA,aAAa,CAChEC,QAAQ,EACRC,IAAI,EACJC,QAA6C,EAC7C;EACA,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;IAC9BC,QAAQ,GAAGD,IAAI;EACjB;EAEAC,QAAQ,CAAC,IAAIC,KAAK,CAAC,iDAAiD,CAAC,EAAE,IAAI,CAAC;AAC9E,CAAC;AAAC;AAEK,SAASC,iBAAiB,GAAU;EACzC,MAAM,IAAID,KAAK,CAAC,iDAAiD,CAAC;AACpE;AAEO,SAASE,kBAAkB,GAAG;EACnC,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIJ,KAAK,CAAC,iDAAiD,CAAC,CAC7D;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["transformFile","filename","opts","callback","Error","exports","transformFileSync","transformFileAsync","Promise","reject"],"sources":["../src/transform-file-browser.ts"],"sourcesContent":["// duplicated from transform-file so we do not have to import anything here\ntype TransformFile = {\n (filename: string, callback: (error: Error, file: null) => void): void;\n (\n filename: string,\n opts: any,\n callback: (error: Error, file: null) => void,\n ): void;\n};\n\nexport const transformFile: TransformFile = function transformFile(\n filename,\n opts,\n callback?: (error: Error, file: null) => void,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n }\n\n callback(new Error(\"Transforming files is not supported in browsers\"), null);\n};\n\nexport function transformFileSync(): never {\n throw new Error(\"Transforming files is not supported in browsers\");\n}\n\nexport function transformFileAsync() {\n return Promise.reject(\n new Error(\"Transforming files is not supported in browsers\"),\n );\n}\n"],"mappings":";;;;;;;;AAUO,MAAMA,aAA4B,GAAG,SAASA,aAAaA,CAChEC,QAAQ,EACRC,IAAI,EACJC,QAA6C,EAC7C;EACA,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;IAC9BC,QAAQ,GAAGD,IAAI;EACjB;EAEAC,QAAQ,CAAC,IAAIC,KAAK,CAAC,iDAAiD,CAAC,EAAE,IAAI,CAAC;AAC9E,CAAC;AAACC,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEK,SAASM,iBAAiBA,CAAA,EAAU;EACzC,MAAM,IAAIF,KAAK,CAAC,iDAAiD,CAAC;AACpE;AAEO,SAASG,kBAAkBA,CAAA,EAAG;EACnC,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIL,KAAK,CAAC,iDAAiD,CAAC,CAC7D;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file.js b/node_modules/@babel/core/lib/transform-file.js index 3864bff7c..d08a85f92 100644 --- a/node_modules/@babel/core/lib/transform-file.js +++ b/node_modules/@babel/core/lib/transform-file.js @@ -27,7 +27,7 @@ const transformFileRunner = _gensync()(function* (filename, opts) { return yield* (0, _transformation.run)(config, code); }); function transformFile(...args) { - return transformFileRunner.errback(...args); + transformFileRunner.errback(...args); } function transformFileSync(...args) { return transformFileRunner.sync(...args); diff --git a/node_modules/@babel/core/lib/transform-file.js.map b/node_modules/@babel/core/lib/transform-file.js.map index c672cc708..0377ec21b 100644 --- a/node_modules/@babel/core/lib/transform-file.js.map +++ b/node_modules/@babel/core/lib/transform-file.js.map @@ -1 +1 @@ -{"version":3,"names":["transformFileRunner","gensync","filename","opts","options","config","loadConfig","code","fs","readFile","run","transformFile","args","errback","transformFileSync","sync","transformFileAsync","async"],"sources":["../src/transform-file.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\nimport type { FileResult, FileResultCallback } from \"./transformation\";\nimport * as fs from \"./gensync-utils/fs\";\n\ntype transformFileBrowserType = typeof import(\"./transform-file-browser\");\ntype transformFileType = typeof import(\"./transform-file\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of transform-file-browser, since this file may be replaced at bundle time with\n// transform-file-browser.\n({} as any as transformFileBrowserType as transformFileType);\n\nconst transformFileRunner = gensync(function* (\n filename: string,\n opts?: InputOptions,\n): Handler {\n const options = { ...opts, filename };\n\n const config: ResolvedConfig | null = yield* loadConfig(options);\n if (config === null) return null;\n\n const code = yield* fs.readFile(filename, \"utf8\");\n return yield* run(config, code);\n});\n\n// @ts-expect-error TS doesn't detect that this signature is compatible\nexport function transformFile(\n filename: string,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n filename: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n ...args: Parameters\n) {\n return transformFileRunner.errback(...args);\n}\n\nexport function transformFileSync(\n ...args: Parameters\n) {\n return transformFileRunner.sync(...args);\n}\nexport function transformFileAsync(\n ...args: Parameters\n) {\n return transformFileRunner.async(...args);\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAEA;AAEA;AAQA,CAAC,CAAC,CAAC;AAEH,MAAMA,mBAAmB,GAAGC,UAAO,CAAC,WAClCC,QAAgB,EAChBC,IAAmB,EACS;EAC5B,MAAMC,OAAO,qBAAQD,IAAI;IAAED;EAAQ,EAAE;EAErC,MAAMG,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACF,OAAO,CAAC;EAChE,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,MAAME,IAAI,GAAG,OAAOC,EAAE,CAACC,QAAQ,CAACP,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,OAAO,IAAAQ,mBAAG,EAACL,MAAM,EAAEE,IAAI,CAAC;AACjC,CAAC,CAAC;AAYK,SAASI,aAAa,CAC3B,GAAGC,IAAoD,EACvD;EACA,OAAOZ,mBAAmB,CAACa,OAAO,CAAC,GAAGD,IAAI,CAAC;AAC7C;AAEO,SAASE,iBAAiB,CAC/B,GAAGF,IAAiD,EACpD;EACA,OAAOZ,mBAAmB,CAACe,IAAI,CAAC,GAAGH,IAAI,CAAC;AAC1C;AACO,SAASI,kBAAkB,CAChC,GAAGJ,IAAkD,EACrD;EACA,OAAOZ,mBAAmB,CAACiB,KAAK,CAAC,GAAGL,IAAI,CAAC;AAC3C;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_config","_transformation","fs","transformFileRunner","gensync","filename","opts","options","Object","assign","config","loadConfig","code","readFile","run","transformFile","args","errback","transformFileSync","sync","transformFileAsync","async"],"sources":["../src/transform-file.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\nimport type { FileResult, FileResultCallback } from \"./transformation\";\nimport * as fs from \"./gensync-utils/fs\";\n\ntype transformFileBrowserType = typeof import(\"./transform-file-browser\");\ntype transformFileType = typeof import(\"./transform-file\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of transform-file-browser, since this file may be replaced at bundle time with\n// transform-file-browser.\n({} as any as transformFileBrowserType as transformFileType);\n\nconst transformFileRunner = gensync(function* (\n filename: string,\n opts?: InputOptions,\n): Handler {\n const options = { ...opts, filename };\n\n const config: ResolvedConfig | null = yield* loadConfig(options);\n if (config === null) return null;\n\n const code = yield* fs.readFile(filename, \"utf8\");\n return yield* run(config, code);\n});\n\n// @ts-expect-error TS doesn't detect that this signature is compatible\nexport function transformFile(\n filename: string,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n filename: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n ...args: Parameters\n) {\n transformFileRunner.errback(...args);\n}\n\nexport function transformFileSync(\n ...args: Parameters\n) {\n return transformFileRunner.sync(...args);\n}\nexport function transformFileAsync(\n ...args: Parameters\n) {\n return transformFileRunner.async(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,EAAA,GAAAH,OAAA;AAQA,CAAC,CAAC,CAAC;AAEH,MAAMI,mBAAmB,GAAGC,UAAO,CAAC,WAClCC,QAAgB,EAChBC,IAAmB,EACS;EAC5B,MAAMC,OAAO,GAAAC,MAAA,CAAAC,MAAA,KAAQH,IAAI;IAAED;EAAQ,EAAE;EAErC,MAAMK,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACJ,OAAO,CAAC;EAChE,IAAIG,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,MAAME,IAAI,GAAG,OAAOV,EAAE,CAACW,QAAQ,CAACR,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,OAAO,IAAAS,mBAAG,EAACJ,MAAM,EAAEE,IAAI,CAAC;AACjC,CAAC,CAAC;AAYK,SAASG,aAAaA,CAC3B,GAAGC,IAAoD,EACvD;EACAb,mBAAmB,CAACc,OAAO,CAAC,GAAGD,IAAI,CAAC;AACtC;AAEO,SAASE,iBAAiBA,CAC/B,GAAGF,IAAiD,EACpD;EACA,OAAOb,mBAAmB,CAACgB,IAAI,CAAC,GAAGH,IAAI,CAAC;AAC1C;AACO,SAASI,kBAAkBA,CAChC,GAAGJ,IAAkD,EACrD;EACA,OAAOb,mBAAmB,CAACkB,KAAK,CAAC,GAAGL,IAAI,CAAC;AAC3C;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform.js.map b/node_modules/@babel/core/lib/transform.js.map index cc6a8109b..3d6aadb18 100644 --- a/node_modules/@babel/core/lib/transform.js.map +++ b/node_modules/@babel/core/lib/transform.js.map @@ -1 +1 @@ -{"version":3,"names":["transformRunner","gensync","transform","code","opts","config","loadConfig","run","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","transformSync","args","transformAsync","async"],"sources":["../src/transform.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation\";\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\nexport type { FileResult } from \"./transformation\";\n\ntype Transform = {\n (code: string, callback: FileResultCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformRunner = gensync(function* transform(\n code: string,\n opts?: InputOptions,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n return yield* run(config, code);\n});\n\nexport const transform: Transform = function transform(\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transform' function expects a callback. If you need to call it synchronously, please use 'transformSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transform' function will expect a callback. If you need to call it synchronously, please use 'transformSync'.\",\n // );\n return beginHiddenCallStack(transformRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(transformRunner.errback)(code, opts, callback);\n};\n\nexport function transformSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.sync)(...args);\n}\nexport function transformAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAEA;AAGA;AAcA,MAAMA,eAAe,GAAGC,UAAO,CAAC,UAAUC,SAAS,CACjDC,IAAY,EACZC,IAAmB,EACS;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,OAAO,OAAO,IAAAE,mBAAG,EAACF,MAAM,EAAEF,IAAI,CAAC;AACjC,CAAC,CAAC;AAEK,MAAMD,SAAoB,GAAG,SAASA,SAAS,CACpDC,IAAI,EACJK,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIL,IAAqC;EACzC,IAAIM,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBJ,IAAI,GAAGO,SAAS;EAClB,CAAC,MAAM;IACLP,IAAI,GAAGI,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACZ,eAAe,CAACa,IAAI,CAAC,CAACV,IAAI,EAAEC,IAAI,CAAC;IAC/D;EACF;EAEA,IAAAQ,uCAAoB,EAACZ,eAAe,CAACc,OAAO,CAAC,CAACX,IAAI,EAAEC,IAAI,EAAEM,QAAQ,CAAC;AACrE,CAAC;AAAC;AAEK,SAASK,aAAa,CAC3B,GAAGC,IAA6C,EAChD;EACA,OAAO,IAAAJ,uCAAoB,EAACZ,eAAe,CAACa,IAAI,CAAC,CAAC,GAAGG,IAAI,CAAC;AAC5D;AACO,SAASC,cAAc,CAC5B,GAAGD,IAA8C,EACjD;EACA,OAAO,IAAAJ,uCAAoB,EAACZ,eAAe,CAACkB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AAC7D;AAAC"} \ No newline at end of file +{"version":3,"names":["_gensync","data","require","_config","_transformation","_rewriteStackTrace","transformRunner","gensync","transform","code","opts","config","loadConfig","run","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","exports","transformSync","args","transformAsync","async"],"sources":["../src/transform.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation\";\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\nexport type { FileResult } from \"./transformation\";\n\ntype Transform = {\n (code: string, callback: FileResultCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformRunner = gensync(function* transform(\n code: string,\n opts?: InputOptions,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n return yield* run(config, code);\n});\n\nexport const transform: Transform = function transform(\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transform' function expects a callback. If you need to call it synchronously, please use 'transformSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transform' function will expect a callback. If you need to call it synchronously, please use 'transformSync'.\",\n // );\n return beginHiddenCallStack(transformRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(transformRunner.errback)(code, opts, callback);\n};\n\nexport function transformSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.sync)(...args);\n}\nexport function transformAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,kBAAA,GAAAH,OAAA;AAcA,MAAMI,eAAe,GAAGC,UAAO,CAAC,UAAUC,SAASA,CACjDC,IAAY,EACZC,IAAmB,EACS;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,OAAO,OAAO,IAAAE,mBAAG,EAACF,MAAM,EAAEF,IAAI,CAAC;AACjC,CAAC,CAAC;AAEK,MAAMD,SAAoB,GAAG,SAASA,SAASA,CACpDC,IAAI,EACJK,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIL,IAAqC;EACzC,IAAIM,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBJ,IAAI,GAAGO,SAAS;EAClB,CAAC,MAAM;IACLP,IAAI,GAAGI,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACZ,eAAe,CAACa,IAAI,CAAC,CAACV,IAAI,EAAEC,IAAI,CAAC;IAC/D;EACF;EAEA,IAAAQ,uCAAoB,EAACZ,eAAe,CAACc,OAAO,CAAC,CAACX,IAAI,EAAEC,IAAI,EAAEM,QAAQ,CAAC;AACrE,CAAC;AAACK,OAAA,CAAAb,SAAA,GAAAA,SAAA;AAEK,SAASc,aAAaA,CAC3B,GAAGC,IAA6C,EAChD;EACA,OAAO,IAAAL,uCAAoB,EAACZ,eAAe,CAACa,IAAI,CAAC,CAAC,GAAGI,IAAI,CAAC;AAC5D;AACO,SAASC,cAAcA,CAC5B,GAAGD,IAA8C,EACjD;EACA,OAAO,IAAAL,uCAAoB,EAACZ,eAAe,CAACmB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AAC7D;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map index c7fb0917f..178dd7886 100644 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map +++ b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map @@ -1 +1 @@ -{"version":3,"names":["LOADED_PLUGIN","blockHoistPlugin","name","visitor","Block","exit","node","body","max","hasChange","i","length","n","p","priority","stableSort","slice","loadBlockHoistPlugin","Plugin","traverse","explode","bodyNode","_blockHoist","buckets","Object","create","bucket","push","keys","map","k","sort","a","b","index","key"],"sources":["../../src/transformation/block-hoist-plugin.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config\";\nimport Plugin from \"../config/plugin\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n const { body } = node;\n\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return;\n\n // My kingdom for a stable sort!\n node.body = stableSort(body.slice());\n },\n },\n },\n};\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[key];\n for (const n of bucket) {\n body[index++] = n;\n }\n }\n return body;\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;AAEA,IAAIA,aAA4B;AAEhC,MAAMC,gBAA8B,GAAG;EAarCC,IAAI,EAAE,qBAAqB;EAE3BC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,IAAI,CAAC;QAAEC;MAAK,CAAC,EAAE;QACb,MAAM;UAAEC;QAAK,CAAC,GAAGD,IAAI;QAGrB,IAAIE,GAAG,GAAG,UAAC,EAAI,EAAE,IAAG,CAAC;QACrB,IAAIC,SAAS,GAAG,KAAK;QACrB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,IAAI,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;UACpC,MAAME,CAAC,GAAGL,IAAI,CAACG,CAAC,CAAC;UACjB,MAAMG,CAAC,GAAGC,QAAQ,CAACF,CAAC,CAAC;UACrB,IAAIC,CAAC,GAAGL,GAAG,EAAE;YACXC,SAAS,GAAG,IAAI;YAChB;UACF;UACAD,GAAG,GAAGK,CAAC;QACT;QACA,IAAI,CAACJ,SAAS,EAAE;QAGhBH,IAAI,CAACC,IAAI,GAAGQ,UAAU,CAACR,IAAI,CAACS,KAAK,EAAE,CAAC;MACtC;IACF;EACF;AACF,CAAC;AAEc,SAASC,oBAAoB,GAAW;EACrD,IAAI,CAACjB,aAAa,EAAE;IAElBA,aAAa,GAAG,IAAIkB,eAAM,mBAEnBjB,gBAAgB;MACnBE,OAAO,EAAEgB,mBAAQ,CAACC,OAAO,CAACnB,gBAAgB,CAACE,OAAO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traverse","data","require","_plugin","LOADED_PLUGIN","blockHoistPlugin","name","visitor","Block","exit","node","body","max","Math","pow","hasChange","i","length","n","p","priority","stableSort","slice","loadBlockHoistPlugin","Plugin","Object","assign","traverse","explode","bodyNode","_blockHoist","buckets","create","bucket","push","keys","map","k","sort","a","b","index","key"],"sources":["../../src/transformation/block-hoist-plugin.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config\";\nimport Plugin from \"../config/plugin\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n const { body } = node;\n\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return;\n\n // My kingdom for a stable sort!\n node.body = stableSort(body.slice());\n },\n },\n },\n};\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[key];\n for (const n of bucket) {\n body[index++] = n;\n }\n }\n return body;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAIE,aAA4B;AAEhC,MAAMC,gBAA8B,GAAG;EAarCC,IAAI,EAAE,qBAAqB;EAE3BC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,IAAIA,CAAC;QAAEC;MAAK,CAAC,EAAE;QACb,MAAM;UAAEC;QAAK,CAAC,GAAGD,IAAI;QAGrB,IAAIE,GAAG,GAAGC,IAAA,CAAAC,GAAA,EAAC,EAAI,EAAE,IAAG,CAAC;QACrB,IAAIC,SAAS,GAAG,KAAK;QACrB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,IAAI,CAACM,MAAM,EAAED,CAAC,EAAE,EAAE;UACpC,MAAME,CAAC,GAAGP,IAAI,CAACK,CAAC,CAAC;UACjB,MAAMG,CAAC,GAAGC,QAAQ,CAACF,CAAC,CAAC;UACrB,IAAIC,CAAC,GAAGP,GAAG,EAAE;YACXG,SAAS,GAAG,IAAI;YAChB;UACF;UACAH,GAAG,GAAGO,CAAC;QACT;QACA,IAAI,CAACJ,SAAS,EAAE;QAGhBL,IAAI,CAACC,IAAI,GAAGU,UAAU,CAACV,IAAI,CAACW,KAAK,EAAE,CAAC;MACtC;IACF;EACF;AACF,CAAC;AAEc,SAASC,oBAAoBA,CAAA,EAAW;EACrD,IAAI,CAACnB,a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3B,KAAK,MAAMxB,CAAC,IAAIe,MAAM,EAAE;MACtBtB,IAAI,CAAC8B,KAAK,EAAE,CAAC,GAAGvB,CAAC;IACnB;EACF;EACA,OAAOP,IAAI;AACb;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/file.js.map b/node_modules/@babel/core/lib/transformation/file/file.js.map index c3cd13fb0..077c66499 100644 --- a/node_modules/@babel/core/lib/transformation/file/file.js.map +++ b/node_modules/@babel/core/lib/transformation/file/file.js.map @@ -1 +1 @@ -{"version":3,"names":["cloneNode","interpreterDirective","errorVisitor","enter","path","state","loc","node","stop","File","constructor","options","code","ast","inputMap","_map","Map","opts","declarations","scope","metadata","hub","file","getCode","getScope","addHelper","bind","buildError","buildCodeFrameError","NodePath","get","parentPath","parent","container","key","setContext","shebang","interpreter","value","replaceWith","remove","set","val","Error","has","getModuleName","addImport","availableHelper","name","versionRange","minVersion","helpers","err","semver","valid","intersects","declar","generator","res","ensure","uid","generateUidIdentifier","dependencies","dep","getDependencies","nodes","globals","Object","keys","getAllBindings","forEach","hasBinding","rename","_compact","unshiftContainer","indexOf","isVariableDeclaration","registerDeclaration","addTemplateObject","msg","_Error","SyntaxError","_loc","traverse","txt","highlightCode","codeFrameColumns","start","line","column","end","undefined"],"sources":["../../../src/transformation/file/file.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport { NodePath } from \"@babel/traverse\";\nimport type { HubInterface, Visitor, Scope } from \"@babel/traverse\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport traverse from \"@babel/traverse\";\nimport { cloneNode, interpreterDirective } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { getModuleName } from \"@babel/helper-module-transforms\";\nimport semver from \"semver\";\n\nimport type { NormalizedFile } from \"../normalize-file\";\n\nconst errorVisitor: Visitor<{ loc: NodeLocation[\"loc\"] | null }> = {\n enter(path, state) {\n const loc = path.node.loc;\n if (loc) {\n state.loc = loc;\n path.stop();\n }\n },\n};\n\nexport type NodeLocation = {\n loc?: {\n end?: {\n line: number;\n column: number;\n };\n start: {\n line: number;\n column: number;\n };\n };\n _loc?: {\n end?: {\n line: number;\n column: number;\n };\n start: {\n line: number;\n column: number;\n };\n };\n};\n\nexport default class File {\n _map: Map = new Map();\n opts: { [key: string]: any };\n declarations: { [key: string]: t.Identifier } = {};\n path: NodePath;\n ast: t.File;\n scope: Scope;\n metadata: { [key: string]: any } = {};\n code: string = \"\";\n inputMap: any;\n\n hub: HubInterface & { file: File } = {\n // keep it for the usage in babel-core, ex: path.hub.file.opts.filename\n file: this,\n getCode: () => this.code,\n getScope: () => this.scope,\n addHelper: this.addHelper.bind(this),\n buildError: this.buildCodeFrameError.bind(this),\n };\n\n constructor(options: {}, { code, ast, inputMap }: NormalizedFile) {\n this.opts = options;\n this.code = code;\n this.ast = ast;\n this.inputMap = inputMap;\n\n this.path = NodePath.get({\n hub: this.hub,\n parentPath: null,\n parent: this.ast,\n container: this.ast,\n key: \"program\",\n }).setContext() as NodePath;\n this.scope = this.path.scope;\n }\n\n /**\n * Provide backward-compatible access to the interpreter directive handling\n * in Babel 6.x. If you are writing a plugin for Babel 7.x, it would be\n * best to use 'program.interpreter' directly.\n */\n get shebang(): string {\n const { interpreter } = this.path.node;\n return interpreter ? interpreter.value : \"\";\n }\n set shebang(value: string) {\n if (value) {\n this.path.get(\"interpreter\").replaceWith(interpreterDirective(value));\n } else {\n this.path.get(\"interpreter\").remove();\n }\n }\n\n set(key: unknown, val: unknown) {\n if (key === \"helpersNamespace\") {\n throw new Error(\n \"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.\" +\n \"If you are using @babel/plugin-external-helpers you will need to use a newer \" +\n \"version than the one you currently have installed. \" +\n \"If you have your own implementation, you'll want to explore using 'helperGenerator' \" +\n \"alongside 'file.availableHelper()'.\",\n );\n }\n\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n has(key: unknown): boolean {\n return this._map.has(key);\n }\n\n getModuleName(): string | undefined | null {\n return getModuleName(this.opts, this.opts);\n }\n\n addImport() {\n throw new Error(\n \"This API has been removed. If you're looking for this \" +\n \"functionality in Babel 7, you should import the \" +\n \"'@babel/helper-module-imports' module and use the functions exposed \" +\n \" from that module, such as 'addNamed' or 'addDefault'.\",\n );\n }\n\n /**\n * Check if a given helper is available in @babel/core's helper list.\n *\n * This _also_ allows you to pass a Babel version specifically. If the\n * helper exists, but was not available for the full given range, it will be\n * considered unavailable.\n */\n availableHelper(name: string, versionRange?: string | null): boolean {\n let minVersion;\n try {\n minVersion = helpers.minVersion(name);\n } catch (err) {\n if (err.code !== \"BABEL_HELPER_UNKNOWN\") throw err;\n\n return false;\n }\n\n if (typeof versionRange !== \"string\") return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // transform-runtime's definitions.js file.\n if (semver.valid(versionRange)) versionRange = `^${versionRange}`;\n\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=8.0.0`, versionRange)\n );\n }\n\n addHelper(name: string): t.Identifier {\n const declar = this.declarations[name];\n if (declar) return cloneNode(declar);\n\n const generator = this.get(\"helperGenerator\");\n if (generator) {\n const res = generator(name);\n if (res) return res;\n }\n\n // make sure that the helper exists\n helpers.ensure(name, File);\n\n const uid = (this.declarations[name] =\n this.scope.generateUidIdentifier(name));\n\n const dependencies: { [key: string]: t.Identifier } = {};\n for (const dep of helpers.getDependencies(name)) {\n dependencies[dep] = this.addHelper(dep);\n }\n\n const { nodes, globals } = helpers.get(\n name,\n dep => dependencies[dep],\n uid,\n Object.keys(this.scope.getAllBindings()),\n );\n\n globals.forEach(name => {\n if (this.path.scope.hasBinding(name, true /* noGlobals */)) {\n this.path.scope.rename(name);\n }\n });\n\n nodes.forEach(node => {\n // @ts-expect-error Fixme: document _compact node property\n node._compact = true;\n });\n\n this.path.unshiftContainer(\"body\", nodes);\n // TODO: NodePath#unshiftContainer should automatically register new\n // bindings.\n this.path.get(\"body\").forEach(path => {\n if (nodes.indexOf(path.node) === -1) return;\n if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);\n });\n\n return uid;\n }\n\n addTemplateObject() {\n throw new Error(\n \"This function has been moved into the template literal transform itself.\",\n );\n }\n\n buildCodeFrameError(\n node: NodeLocation | undefined | null,\n msg: string,\n _Error: typeof Error = SyntaxError,\n ): Error {\n let loc = node && (node.loc || node._loc);\n\n if (!loc && node) {\n const state: { loc?: NodeLocation[\"loc\"] | null } = {\n loc: null,\n };\n traverse(node as t.Node, errorVisitor, this.scope, state);\n loc = state.loc;\n\n let txt =\n \"This is an error on an internal node. Probably an internal error.\";\n if (loc) txt += \" Location has been estimated.\";\n\n msg += ` (${txt})`;\n }\n\n if (loc) {\n const { highlightCode = true } = this.opts;\n\n msg +=\n \"\\n\" +\n codeFrameColumns(\n this.code,\n {\n start: {\n line: loc.start.line,\n column: loc.start.column + 1,\n },\n end:\n loc.end && loc.start.line === loc.end.line\n ? {\n line: loc.end.line,\n column: loc.end.column + 1,\n }\n : undefined,\n },\n { highlightCode },\n );\n }\n\n return new _Error(msg);\n }\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA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,EACrCwE,GAAW,EACXC,MAAoB,GAAGC,WAAW,EAC3B;IACP,IAAI3E,GAAG,GAAGC,IAAI,KAAKA,IAAI,CAACD,GAAG,IAAIC,IAAI,CAAC2E,IAAI,CAAC;IAEzC,IAAI,CAAC5E,GAAG,IAAIC,IAAI,EAAE;MAChB,MAAMF,KAA2C,GAAG;QAClDC,GAAG,EAAE;MACP,CAAC;MACD,IAAA6E,mBAAQ,EAAC5E,IAAI,EAAYL,YAAY,EAAE,IAAI,CAACiB,KAAK,EAAEd,KAAK,CAAC;MACzDC,GAAG,GAAGD,KAAK,CAACC,GAAG;MAEf,IAAI8E,GAAG,GACL,mEAAmE;MACrE,IAAI9E,GAAG,EAAE8E,GAAG,IAAI,+BAA+B;MAE/CL,GAAG,IAAK,KAAIK,GAAI,GAAE;IACpB;IAEA,IAAI9E,GAAG,EAAE;MACP,MAAM;QAAE+E,aAAa,GAAG;MAAK,CAAC,GAAG,IAAI,CAACpE,IAAI;MAE1C8D,GAAG,IACD,IAAI,GACJ,IAAAO,6BAAgB,EACd,IAAI,CAAC1E,IAAI,EACT;QACE2E,KAAK,EAAE;UACLC,IAAI,EAAElF,GAAG,CAACiF,KAAK,CAACC,IAAI;UACpBC,MAAM,EAAEnF,GAAG,CAACiF,KAAK,CAACE,MAAM,GAAG;QAC7B,CAAC;QACDC,GAAG,EACDpF,GAAG,CAACoF,GAAG,IAAIpF,GAAG,CAACiF,KAAK,CAACC,IAAI,KAAKlF,GAAG,CAACoF,GAAG,CAACF,IAAI,GACtC;UACEA,IAAI,EAAElF,GAAG,CAACoF,GAAG,CAACF,IAAI;UAClBC,MAAM,EAAEnF,GAAG,CAACoF,GAAG,CAACD,MAAM,GAAG;QAC3B,CAAC,GACDE;MACR,CAAC,EACD;QAAEN;MAAc,CAAC,CAClB;IACL;IAEA,OAAO,IAAIL,MAAM,CAACD,GAAG,CAAC;EACxB;AACF;AAAC;AAAA"} \ No newline at end of file +{"version":3,"names":["helpers","data","require","_traverse","_codeFrame","_t","_helperModuleTransforms","_semver","cloneNode","interpreterDirective","errorVisitor","enter","path","state","loc","node","stop","File","constructor","options","code","ast","inputMap","_map","Map","opts","declarations","scope","metadata","hub","file","getCode","getScope","addHelper","bind","buildError","buildCodeFrameError","NodePath","get","parentPath","parent","container","key","setContext","shebang","interpreter","value","replaceWith","remove","set","val","Error","has","getModuleName","addImport","availableHelper","name","versionRange","minVersion","err","semver","valid","intersects","declar","generator","res","ensure","uid","generateUidIdentifier","dependencies","dep","getDependencies","nodes","globals","Object","keys","getAllBindings","forEach","hasBinding","rename","_compact","unshiftContainer","indexOf","isVariableDeclaration","registerDeclaration","addTemplateObject","msg","_Error","SyntaxError","_loc","traverse","txt","highlightCode","codeFrameColumns","start","line","column","end","undefined","exports","default"],"sources":["../../../src/transformation/file/file.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport { NodePath } from \"@babel/traverse\";\nimport type { HubInterface, Visitor, Scope } from \"@babel/traverse\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport traverse from \"@babel/traverse\";\nimport { cloneNode, interpreterDirective } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { getModuleName } from \"@babel/helper-module-transforms\";\nimport semver from \"semver\";\n\nimport type { NormalizedFile } from \"../normalize-file\";\n\nconst errorVisitor: Visitor<{ loc: NodeLocation[\"loc\"] | null }> = {\n enter(path, state) {\n const loc = path.node.loc;\n if (loc) {\n state.loc = loc;\n path.stop();\n }\n },\n};\n\nexport type NodeLocation = {\n loc?: {\n end?: {\n line: number;\n column: number;\n };\n start: {\n line: number;\n column: number;\n };\n };\n _loc?: {\n end?: {\n line: number;\n column: number;\n };\n start: {\n line: number;\n column: number;\n };\n };\n};\n\nexport default class File {\n _map: Map = new Map();\n opts: { [key: string]: any };\n declarations: { [key: string]: t.Identifier } = {};\n path: NodePath;\n ast: t.File;\n scope: Scope;\n metadata: { [key: string]: any } = {};\n code: string = \"\";\n inputMap: any;\n\n hub: HubInterface & { file: File } = {\n // keep it for the usage in babel-core, ex: path.hub.file.opts.filename\n file: this,\n getCode: () => this.code,\n getScope: () => this.scope,\n addHelper: this.addHelper.bind(this),\n buildError: this.buildCodeFrameError.bind(this),\n };\n\n constructor(options: {}, { code, ast, inputMap }: NormalizedFile) {\n this.opts = options;\n this.code = code;\n this.ast = ast;\n this.inputMap = inputMap;\n\n this.path = NodePath.get({\n hub: this.hub,\n parentPath: null,\n parent: this.ast,\n container: this.ast,\n key: \"program\",\n }).setContext() as NodePath;\n this.scope = this.path.scope;\n }\n\n /**\n * Provide backward-compatible access to the interpreter directive handling\n * in Babel 6.x. If you are writing a plugin for Babel 7.x, it would be\n * best to use 'program.interpreter' directly.\n */\n get shebang(): string {\n const { interpreter } = this.path.node;\n return interpreter ? interpreter.value : \"\";\n }\n set shebang(value: string) {\n if (value) {\n this.path.get(\"interpreter\").replaceWith(interpreterDirective(value));\n } else {\n this.path.get(\"interpreter\").remove();\n }\n }\n\n set(key: unknown, val: unknown) {\n if (key === \"helpersNamespace\") {\n throw new Error(\n \"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.\" +\n \"If you are using @babel/plugin-external-helpers you will need to use a newer \" +\n \"version than the one you currently have installed. \" +\n \"If you have your own implementation, you'll want to explore using 'helperGenerator' \" +\n \"alongside 'file.availableHelper()'.\",\n );\n }\n\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n has(key: unknown): boolean {\n return this._map.has(key);\n }\n\n getModuleName(): string | undefined | null {\n return getModuleName(this.opts, this.opts);\n }\n\n addImport() {\n throw new Error(\n \"This API has been removed. If you're looking for this \" +\n \"functionality in Babel 7, you should import the \" +\n \"'@babel/helper-module-imports' module and use the functions exposed \" +\n \" from that module, such as 'addNamed' or 'addDefault'.\",\n );\n }\n\n /**\n * Check if a given helper is available in @babel/core's helper list.\n *\n * This _also_ allows you to pass a Babel version specifically. If the\n * helper exists, but was not available for the full given range, it will be\n * considered unavailable.\n */\n availableHelper(name: string, versionRange?: string | null): boolean {\n let minVersion;\n try {\n minVersion = helpers.minVersion(name);\n } catch (err) {\n if (err.code !== \"BABEL_HELPER_UNKNOWN\") throw err;\n\n return false;\n }\n\n if (typeof versionRange !== \"string\") return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // transform-runtime's definitions.js file.\n if (semver.valid(versionRange)) versionRange = `^${versionRange}`;\n\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=8.0.0`, versionRange)\n );\n }\n\n addHelper(name: string): t.Identifier {\n const declar = this.declarations[name];\n if (declar) return cloneNode(declar);\n\n const generator = this.get(\"helperGenerator\");\n if (generator) {\n const res = generator(name);\n if (res) return res;\n }\n\n // make sure that the helper exists\n helpers.ensure(name, File);\n\n const uid = (this.declarations[name] =\n this.scope.generateUidIdentifier(name));\n\n const dependencies: { [key: string]: t.Identifier } = {};\n for (const dep of helpers.getDependencies(name)) {\n dependencies[dep] = this.addHelper(dep);\n }\n\n const { nodes, globals } = helpers.get(\n name,\n dep => dependencies[dep],\n uid,\n Object.keys(this.scope.getAllBindings()),\n );\n\n globals.forEach(name => {\n if (this.path.scope.hasBinding(name, true /* noGlobals */)) {\n this.path.scope.rename(name);\n }\n });\n\n nodes.forEach(node => {\n // @ts-expect-error Fixme: document _compact node property\n node._compact = true;\n });\n\n this.path.unshiftContainer(\"body\", nodes);\n // TODO: NodePath#unshiftContainer should automatically register new\n // bindings.\n this.path.get(\"body\").forEach(path => {\n if (nodes.indexOf(path.node) === -1) return;\n if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);\n });\n\n return uid;\n }\n\n addTemplateObject() {\n throw new Error(\n \"This function has been moved into the template literal transform itself.\",\n );\n }\n\n buildCodeFrameError(\n node: NodeLocation | undefined | null,\n msg: string,\n _Error: typeof Error = SyntaxError,\n ): Error {\n let loc = node && (node.loc || node._loc);\n\n if (!loc && node) {\n const state: { loc?: NodeLocation[\"loc\"] | null } = {\n loc: null,\n };\n traverse(node as t.Node, errorVisitor, this.scope, state);\n loc = state.loc;\n\n let txt =\n \"This is an error on an internal node. Probably an internal error.\";\n if (loc) txt += \" Location has been estimated.\";\n\n msg += ` (${txt})`;\n }\n\n if (loc) {\n const { highlightCode = true } = this.opts;\n\n msg +=\n \"\\n\" +\n codeFrameColumns(\n this.code,\n {\n start: {\n line: loc.start.line,\n column: loc.start.column + 1,\n },\n end:\n loc.end && loc.start.line === loc.end.line\n ? {\n line: loc.end.line,\n column: loc.end.column + 1,\n }\n : undefined,\n },\n { highlightCode },\n );\n }\n\n return new _Error(msg);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,GAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,EAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,wBAA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I,EAAEjF,GAAG,CAACmF,GAAG,CAACF,IAAI;UAClBC,MAAM,EAAElF,GAAG,CAACmF,GAAG,CAACD,MAAM,GAAG;QAC3B,CAAC,GACDE;MACR,CAAC,EACD;QAAEN;MAAc,CAAC,CAClB;IACL;IAEA,OAAO,IAAIL,MAAM,CAACD,GAAG,CAAC;EACxB;AACF;AAACa,OAAA,CAAAC,OAAA,GAAAnF,IAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js b/node_modules/@babel/core/lib/transformation/file/generate.js index 47bb73178..351bc0b28 100644 --- a/node_modules/@babel/core/lib/transformation/file/generate.js +++ b/node_modules/@babel/core/lib/transformation/file/generate.js @@ -29,6 +29,7 @@ function generateCode(pluginPasses, file) { const { generatorOpts } = opts; + generatorOpts.inputSourceMap = inputMap == null ? void 0 : inputMap.toObject(); const results = []; for (const plugins of pluginPasses) { for (const plugin of plugins) { @@ -56,11 +57,15 @@ function generateCode(pluginPasses, file) { code: outputCode, decodedMap: outputMap = result.map } = result; - if (outputMap) { - if (inputMap) { - outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName); - } else { - outputMap = result.map; + if (result.__mergedMap) { + outputMap = Object.assign({}, result.map); + } else { + if (outputMap) { + if (inputMap) { + outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName); + } else { + outputMap = result.map; + } } } if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js.map b/node_modules/@babel/core/lib/transformation/file/generate.js.map index 76c23006b..a6f6e7a3e 100644 --- a/node_modules/@babel/core/lib/transformation/file/generate.js.map +++ b/node_modules/@babel/core/lib/transformation/file/generate.js.map @@ -1 +1 @@ -{"version":3,"names":["generateCode","pluginPasses","file","opts","ast","code","inputMap","generatorOpts","results","plugins","plugin","generatorOverride","result","generate","undefined","push","length","then","Error","outputCode","decodedMap","outputMap","map","mergeSourceMap","toObject","sourceFileName","sourceMaps","convertSourceMap","fromObject","toComment"],"sources":["../../../src/transformation/file/generate.ts"],"sourcesContent":["import type { PluginPasses } from \"../../config\";\nimport convertSourceMap from \"convert-source-map\";\ntype SourceMap = any;\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file\";\nimport mergeSourceMap from \"./merge-map\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: SourceMap | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n return { outputCode, outputMap };\n}\n"],"mappings":";;;;;;AACA;EA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,MAAM;EAErE,IAAIS,SAAS,EAAE;IACb,IAAIf,QAAQ,EAAE;MAEZe,SAAS,GAAG,IAAAE,iBAAc,EACxBjB,QAAQ,CAACkB,QAAQ,EAAE,EACnBH,SAAS,EACTd,aAAa,CAACkB,cAAc,CAC7B;IACH,CAAC,MAAM;MAGLJ,SAAS,GAAGT,MAAM,CAACU,GAAG;IACxB;EACF;EAEA,IAAInB,IAAI,CAACuB,UAAU,KAAK,QAAQ,IAAIvB,IAAI,CAACuB,UAAU,KAAK,MAAM,EAAE;IAC9DP,UAAU,IAAI,IAAI,GAAGQ,mBAAgB,CAACC,UAAU,CAACP,SAAS,CAAC,CAACQ,SAAS,EAAE;EACzE;EAEA,IAAI1B,IAAI,CAACuB,UAAU,KAAK,QAAQ,EAAE;IAChCL,SAAS,GAAG,IAAI;EAClB;EAEA,OAAO;IAAEF,UAAU;IAAEE;EAAU,CAAC;AAClC;AAAC"} \ No newline at end of file +{"version":3,"names":["_convertSourceMap","data","require","_generator","_mergeMap","generateCode","pluginPasses","file","opts","ast","code","inputMap","generatorOpts","inputSourceMap","toObject","results","plugins","plugin","generatorOverride","result","generate","undefined","push","length","then","Error","outputCode","decodedMap","outputMap","map","__mergedMap","Object","assign","mergeSourceMap","sourceFileName","sourceMaps","convertSourceMap","fromObject","toComment"],"sources":["../../../src/transformation/file/generate.ts"],"sourcesContent":["import type { PluginPasses } from \"../../config\";\nimport convertSourceMap from \"convert-source-map\";\ntype SourceMap = any;\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file\";\nimport mergeSourceMap from \"./merge-map\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: SourceMap | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n generatorOpts.inputSourceMap = inputMap?.toObject();\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n // For backwards compat.\n if (result.__mergedMap) {\n /**\n * @see mergeSourceMap\n */\n outputMap = { ...result.map };\n } else {\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n return { outputCode, outputMap };\n}\n"],"mappings":";;;;;;AACA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAG,SAAA,GAAAF,OAAA;AAEe,SAASG,YAAYA,CAClCC,YAA0B,EAC1BC,IAAU,EAIV;EACA,MAAM;IAA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AAAC,MAAA,KAAQb,MAAM,CAACU,GAAG,CAAE;EAC/B,CAAC,MAAM;IACL,IAAID,SAAS,EAAE;MACb,IAAIjB,QAAQ,EAAE;QAEZiB,SAAS,GAAG,IAAAK,iBAAc,EACxBtB,QAAQ,CAACG,QAAQ,EAAE,EACnBc,SAAS,EACThB,aAAa,CAACsB,cAAc,CAC7B;MACH,CAAC,MAAM;QAGLN,SAAS,GAAGT,MAAM,CAACU,GAAG;MACxB;IACF;EACF;EAEA,IAAIrB,IAAI,CAAC2B,UAAU,KAAK,QAAQ,IAAI3B,IAAI,CAAC2B,UAAU,KAAK,MAAM,EAAE;IAC9DT,UAAU,IAAI,IAAI,GAAGU,mBAAgB,CAACC,UAAU,CAACT,SAAS,CAAC,CAACU,SAAS,EAAE;EACzE;EAEA,IAAI9B,IAAI,CAAC2B,UAAU,KAAK,QAAQ,EAAE;IAChCP,SAAS,GAAG,IAAI;EAClB;EAEA,OAAO;IAAEF,UAAU;IAAEE;EAAU,CAAC;AAClC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js.map b/node_modules/@babel/core/lib/transformation/file/merge-map.js.map index 7c38f728b..6eb511f16 100644 --- a/node_modules/@babel/core/lib/transformation/file/merge-map.js.map +++ b/node_modules/@babel/core/lib/transformation/file/merge-map.js.map @@ -1 +1 @@ -{"version":3,"names":["mergeSourceMap","inputMap","map","sourceFileName","source","replace","found","result","remapping","rootless","s","ctx","sourceRoot"],"sources":["../../../src/transformation/file/merge-map.ts"],"sourcesContent":["type SourceMap = any;\nimport remapping from \"@ampproject/remapping\";\n\nexport default function mergeSourceMap(\n inputMap: SourceMap,\n map: SourceMap,\n sourceFileName: string,\n): SourceMap {\n // On win32 machines, the sourceFileName uses backslash paths like\n // `C:\\foo\\bar.js`. But sourcemaps are always posix paths, so we need to\n // normalize to regular slashes before we can merge (else we won't find the\n // source associated with our input map).\n // This mirrors code done while generating the output map at\n // https://github.com/babel/babel/blob/5c2fcadc9ae34fd20dd72b1111d5cf50476d700d/packages/babel-generator/src/source-map.ts#L102\n const source = sourceFileName.replace(/\\\\/g, \"/\");\n\n // Prevent an infinite recursion if one of the input map's sources has the\n // same resolved path as the input map. In the case, it would keep find the\n // input map, then get it's sources which will include a path like the input\n // map, on and on.\n let found = false;\n const result = remapping(rootless(map), (s, ctx) => {\n if (s === source && !found) {\n found = true;\n // We empty the source location, which will prevent the sourcemap from\n // becoming relative to the input's location. Eg, if we're transforming a\n // file 'foo/bar.js', and it is a transformation of a `baz.js` file in the\n // same directory, the expected output is just `baz.js`. Without this step,\n // it would become `foo/baz.js`.\n ctx.source = \"\";\n\n return rootless(inputMap);\n }\n\n return null;\n });\n\n if (typeof inputMap.sourceRoot === \"string\") {\n result.sourceRoot = inputMap.sourceRoot;\n }\n\n // remapping returns a SourceMap class type, but this breaks code downstream in\n // @babel/traverse and @babel/types that relies on data being plain objects.\n // When it encounters the sourcemap type it outputs a \"don't know how to turn\n // this value into a node\" error. As a result, we are converting the merged\n // sourcemap to a plain js object.\n return { ...result };\n}\n\nfunction rootless(map: SourceMap): SourceMap {\n return {\n ...map,\n\n // This is a bit hack. Remapping will create absolute sources in our\n // sourcemap, but we want to maintain sources relative to the sourceRoot.\n // We'll re-add the sourceRoot after remapping.\n sourceRoot: null,\n };\n}\n"],"mappings":";;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEe,SAASA,cAAc,CACpCC,QAAmB,EACnBC,GAAc,EACdC,cAAsB,EACX;EAOX,MAAMC,MAAM,GAAGD,cAAc,CAACE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAMjD,IAAIC,KAAK,GAAG,KAAK;EACjB,MAAMC,MAAM,GAAGC,YAAS,CAACC,QAAQ,CAACP,GAAG,CAAC,EAAE,CAACQ,CAAC,EAAEC,GAAG,KAAK;IAClD,IAAID,CAAC,KAAKN,MAAM,IAAI,CAACE,KAAK,EAAE;MAC1BA,KAAK,GAAG,IAAI;MAMZK,GAAG,CAACP,MAAM,GAAG,EAAE;MAEf,OAAOK,QAAQ,CAACR,QAAQ,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb,CAAC,CAAC;EAEF,IAAI,OAAOA,QAAQ,CAACW,UAAU,KAAK,QAAQ,EAAE;IAC3CL,MAAM,CAACK,UAAU,GAAGX,QAAQ,CAACW,UAAU;EACzC;EAOA,yBAAYL,MAAM;AACpB;AAEA,SAASE,QAAQ,CAACP,GAAc,EAAa;EAC3C,yBACKA,GAAG;IAKNU,UAAU,EAAE;EAAI;AAEpB;AAAC"} \ No newline at end of file +{"version":3,"names":["_remapping","data","require","mergeSourceMap","inputMap","map","sourceFileName","source","replace","found","result","remapping","rootless","s","ctx","sourceRoot","Object","assign"],"sources":["../../../src/transformation/file/merge-map.ts"],"sourcesContent":["type SourceMap = any;\nimport remapping from \"@ampproject/remapping\";\n\nexport default function mergeSourceMap(\n inputMap: SourceMap,\n map: SourceMap,\n sourceFileName: string,\n): SourceMap {\n // On win32 machines, the sourceFileName uses backslash paths like\n // `C:\\foo\\bar.js`. But sourcemaps are always posix paths, so we need to\n // normalize to regular slashes before we can merge (else we won't find the\n // source associated with our input map).\n // This mirrors code done while generating the output map at\n // https://github.com/babel/babel/blob/5c2fcadc9ae34fd20dd72b1111d5cf50476d700d/packages/babel-generator/src/source-map.ts#L102\n const source = sourceFileName.replace(/\\\\/g, \"/\");\n\n // Prevent an infinite recursion if one of the input map's sources has the\n // same resolved path as the input map. In the case, it would keep find the\n // input map, then get it's sources which will include a path like the input\n // map, on and on.\n let found = false;\n const result = remapping(rootless(map), (s, ctx) => {\n if (s === source && !found) {\n found = true;\n // We empty the source location, which will prevent the sourcemap from\n // becoming relative to the input's location. Eg, if we're transforming a\n // file 'foo/bar.js', and it is a transformation of a `baz.js` file in the\n // same directory, the expected output is just `baz.js`. Without this step,\n // it would become `foo/baz.js`.\n ctx.source = \"\";\n\n return rootless(inputMap);\n }\n\n return null;\n });\n\n if (typeof inputMap.sourceRoot === \"string\") {\n result.sourceRoot = inputMap.sourceRoot;\n }\n\n // remapping returns a SourceMap class type, but this breaks code downstream in\n // @babel/traverse and @babel/types that relies on data being plain objects.\n // When it encounters the sourcemap type it outputs a \"don't know how to turn\n // this value into a node\" error. As a result, we are converting the merged\n // sourcemap to a plain js object.\n return { ...result };\n}\n\nfunction rootless(map: SourceMap): SourceMap {\n return {\n ...map,\n\n // This is a bit hack. Remapping will create absolute sources in our\n // sourcemap, but we want to maintain sources relative to the sourceRoot.\n // We'll re-add the sourceRoot after remapping.\n sourceRoot: null,\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEe,SAASE,cAAcA,CACpCC,QAAmB,EACnBC,GAAc,EACdC,cAAsB,EACX;EAOX,MAAMC,MAAM,GAAGD,cAAc,CAACE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAMjD,IAAIC,KAAK,GAAG,KAAK;EACjB,MAAMC,MAAM,GAAGC,YAAS,CAACC,QAAQ,CAACP,GAAG,CAAC,EAAE,CAACQ,CAAC,EAAEC,GAAG,KAAK;IAClD,IAAID,CAAC,KAAKN,MAAM,IAAI,CAACE,KAAK,EAAE;MAC1BA,KAAK,GAAG,IAAI;MAMZK,GAAG,CAACP,MAAM,GAAG,EAAE;MAEf,OAAOK,QAAQ,CAACR,QAAQ,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb,CAAC,CAAC;EAEF,IAAI,OAAOA,QAAQ,CAACW,UAAU,KAAK,QAAQ,EAAE;IAC3CL,MAAM,CAACK,UAAU,GAAGX,QAAQ,CAACW,UAAU;EACzC;EAOA,OAAAC,MAAA,CAAAC,MAAA,KAAYP,MAAM;AACpB;AAEA,SAASE,QAAQA,CAACP,GAAc,EAAa;EAC3C,OAAAW,MAAA,CAAAC,MAAA,KACKZ,GAAG;IAKNU,UAAU,EAAE;EAAI;AAEpB;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/index.js.map b/node_modules/@babel/core/lib/transformation/index.js.map index b30dd09aa..ba856a709 100644 --- a/node_modules/@babel/core/lib/transformation/index.js.map +++ b/node_modules/@babel/core/lib/transformation/index.js.map @@ -1 +1 @@ -{"version":3,"names":["run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","message","filename","outputCode","outputMap","generateCode","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","fn","pre","result","call","isThenable","Error","traverse","merge","wrapPluginVisitorMethod","scope","post","val","then"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\ntype SourceMap = any;\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config\";\n\nimport PluginPass from \"./plugin-pass\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin\";\nimport normalizeOptions from \"./normalize-opts\";\nimport normalizeFile from \"./normalize-file\";\n\nimport generateCode from \"./file/generate\";\nimport type File from \"./file/file\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: { [key: string]: any };\n options: { [key: string]: any };\n ast: t.File | null;\n code: string | null;\n map: SourceMap | null;\n sourceType: \"script\" | \"module\";\n externalDependencies: Set;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler {\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.pre;\n if (fn) {\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .pre\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .pre, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n traverse(file.ast, visitor, file.scope);\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.post;\n if (fn) {\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .post\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .post, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n }\n}\n\nfunction isThenable>(val: any): val is T {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAOA;AACA;AACA;AACA;AAEA;AAGA;AAiBO,UAAUA,GAAG,CAClBC,MAAsB,EACtBC,IAAY,EACZC,GAA+B,EACV;EACrB,MAAMC,IAAI,GAAG,OAAO,IAAAC,sBAAa,EAC/BJ,MAAM,CAACK,MAAM,EACb,IAAAC,sBAAgB,EAACN,MAAM,CAAC,EACxBC,IAAI,EACJC,GAAG,CACJ;EAED,MAAMK,IAAI,GAAGJ,IAAI,CAACI,IAAI;EACtB,IAAI;IACF,OAAOC,aAAa,CAACL,IAAI,EAAEH,MAAM,CAACK,MAAM,CAAC;EAC3C,CAAC,CAAC,OAAOI,CAAC,EAAE;IAAA;IACVA,CAAC,CAACC,OAAO,GAAI,qBAAEH,IAAI,CAACI,QAAQ,6BAAI,cAAe,KAAIF,CAAC,CAACC,OAAQ,EAAC;IAC9D,IAAI,CAACD,CAAC,CAACR,IAAI,EAAE;MACXQ,CAAC,CAACR,IAAI,GAAG,uBAAuB;IAClC;IACA,MAAMQ,CAAC;EACT;EAEA,IAAIG,UAAU,EAAEC,SAAS;EACzB,IAAI;IACF,IAAIN,IAAI,CAACN,IAAI,KAAK,KAAK,EAAE;MACvB,CAAC;QAAEW,UAAU;QAAEC;MAAU,CAAC,GAAG,IAAAC,iBAAY,EAACd,MAAM,CAACK,MAAM,EAAEF,IAAI,CAAC;IAChE;EACF,CAAC,CAAC,OAAOM,CAAC,EAAE;IAAA;IACVA,CAAC,CAACC,OAAO,GAAI,sBAAEH,IAAI,CAACI,QAAQ,8BAAI,cAAe,KAAIF,CAAC,CAACC,OAAQ,EAAC;IAC9D,IAAI,CAACD,CAAC,CAACR,IAAI,EAAE;MACXQ,CAAC,CAACR,IAAI,GAAG,sBAAsB;IACj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E,CAACG,IAAI,CAACR,IAAI,EAAE3B,IAAI,CAAC;QAGlC,OAAO,EAAE;QAET,IAAIoC,UAAU,CAACF,MAAM,CAAC,EAAE;UACtB,MAAM,IAAIG,KAAK,CACZ,uDAAsD,GACpD,wDAAuD,GACvD,8DAA6D,GAC7D,2BAA0B,CAC9B;QACH;MACF;IACF;IAGA,MAAMN,OAAO,GAAGO,mBAAQ,CAACf,QAAQ,CAACgB,KAAK,CACrChB,QAAQ,EACRrB,MAAM,EACNF,IAAI,CAACI,IAAI,CAACoC,uBAAuB,CAClC;IACD,IAAAF,mBAAQ,EAACtC,IAAI,CAACD,GAAG,EAAEgC,OAAO,EAAE/B,IAAI,CAACyC,KAAK,CAAC;IAEvC,KAAK,MAAM,CAACjB,MAAM,EAAEG,IAAI,CAAC,IAAIL,SAAS,EAAE;MACtC,MAAMU,EAAE,GAAGR,MAAM,CAACkB,IAAI;MACtB,IAAIV,EAAE,EAAE;QACN,MAAME,MAAM,GAAGF,EAAE,CAACG,IAAI,CAACR,IAAI,EAAE3B,IAAI,CAAC;QAGlC,OAAO,EAAE;QAET,IAAIoC,UAAU,CAACF,MAAM,CAAC,EAAE;UACtB,MAAM,IAAIG,KAAK,CACZ,wDAAuD,GACrD,wDAAuD,GACvD,8DAA6D,GAC7D,2BAA0B,CAC9B;QACH;MACF;IACF;EACF;AACF;AAEA,SAASD,UAAU,CAA6BO,GAAQ,EAAY;EAClE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACC,IAAI,IACV,OAAOD,GAAG,CAACC,IAAI,KAAK,UAAU;AAElC;AAAC"} \ No newline at end of file +{"version":3,"names":["_traverse","data","require","_pluginPass","_blockHoistPlugin","_normalizeOpts","_normalizeFile","_generate","_deepArray","run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","_opts$filename","message","filename","outputCode","outputMap","generateCode","_opts$filename2","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","fn","pre","result","call","isThenable","Error","traverse","merge","wrapPluginVisitorMethod","scope","post","val","then"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\ntype SourceMap = any;\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config\";\n\nimport PluginPass from \"./plugin-pass\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin\";\nimport normalizeOptions from \"./normalize-opts\";\nimport normalizeFile from \"./normalize-file\";\n\nimport generateCode from \"./file/generate\";\nimport type File from \"./file/file\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: { [key: string]: any };\n options: { [key: string]: any };\n ast: t.File | null;\n code: string | null;\n map: SourceMap | null;\n sourceType: \"script\" | \"module\";\n externalDependencies: Set;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler {\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.pre;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .pre\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .pre, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n traverse(file.ast, visitor, file.scope);\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.post;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .post\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .post, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n }\n}\n\nfunction isThenable>(val: any): val is T {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA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normalize-file.js b/node_modules/@babel/core/lib/transformation/normalize-file.js index 2ece15c16..a07586f37 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js +++ b/node_modules/@babel/core/lib/transformation/normalize-file.js @@ -47,7 +47,6 @@ const { traverseFast } = _t(); const debug = _debug()("babel:transform:file"); -const LARGE_INPUT_SOURCEMAP_THRESHOLD = 3000000; const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/; const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/; function* normalizeFile(pluginPasses, options, code, ast) { @@ -84,12 +83,8 @@ function* normalizeFile(pluginPasses, options, code, ast) { if (typeof options.filename === "string" && lastComment) { try { const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment); - const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1])); - if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) { - debug("skip merging input map > 1 MB"); - } else { - inputMap = _convertSourceMap().fromJSON(inputMapContent); - } + const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1]), "utf8"); + inputMap = _convertSourceMap().fromJSON(inputMapContent); } catch (err) { debug("discarding unknown file input sourcemap", err); } diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js.map b/node_modules/@babel/core/lib/transformation/normalize-file.js.map index 3eee29864..07259b34b 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js.map +++ b/node_modules/@babel/core/lib/transformation/normalize-file.js.map @@ -1 +1 @@ -{"version":3,"names":["file","traverseFast","debug","buildDebug","LARGE_INPUT_SOURCEMAP_THRESHOLD","INLINE_SOURCEMAP_REGEX","EXTERNAL_SOURCEMAP_REGEX","normalizeFile","pluginPasses","options","code","ast","type","Error","cloneInputAst","cloneDeep","parser","inputMap","inputSourceMap","convertSourceMap","fromObject","lastComment","extractComments","fromComment","err","filename","match","exec","inputMapContent","fs","readFileSync","path","resolve","dirname","length","fromJSON","File","extractCommentsFromList","regex","comments","filter","value","test","node","leadingComments","innerComments","trailingComments"],"sources":["../../src/transformation/normalize-file.ts"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file\";\nimport parser from \"../parser\";\nimport cloneDeep from \"./util/clone-deep\";\n\nconst debug = buildDebug(\"babel:transform:file\");\nconst LARGE_INPUT_SOURCEMAP_THRESHOLD = 3_000_000;\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\n// eslint-disable-next-line max-len\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,(?:.*)$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: { [key: string]: any },\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n // @ts-expect-error todo: use babel-types ast typings in Babel parser\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(lastComment);\n } catch (err) {\n debug(\"discarding unknown inline input sourcemap\", err);\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n );\n if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) {\n debug(\"skip merging input map > 1 MB\");\n } else {\n inputMap = convertSourceMap.fromJSON(\n // todo:\n inputMapContent as unknown as string,\n );\n }\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast as t.File,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;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I;EAC9B,IAAIkB,QAAQ,EAAE;IACZA,QAAQ,GAAGA,QAAQ,CAACC,MAAM,CAAC,CAAC;MAAEC;IAAM,CAAC,KAAK;MACxC,IAAIH,KAAK,CAACI,IAAI,CAACD,KAAK,CAAC,EAAE;QACrBpB,WAAW,GAAGoB,KAAK;QACnB,OAAO,KAAK;MACd;MACA,OAAO,IAAI;IACb,CAAC,CAAC;EACJ;EACA,OAAO,CAACF,QAAQ,EAAElB,WAAW,CAAC;AAChC;AAEA,SAASC,eAAe,CAACgB,KAAa,EAAE3B,GAAW,EAAE;EACnD,IAAIU,WAAmB,GAAG,IAAI;EAC9BpB,YAAY,CAACU,GAAG,EAAEgC,IAAI,IAAI;IACxB,CAACA,IAAI,CAACC,eAAe,EAAEvB,WAAW,CAAC,GAAGgB,uBAAuB,CAC3DC,KAAK,EACLK,IAAI,CAACC,eAAe,EACpBvB,WAAW,CACZ;IACD,CAACsB,IAAI,CAACE,aAAa,EAAExB,WAAW,CAAC,GAAGgB,uBAAuB,CACzDC,KAAK,EACLK,IAAI,CAACE,aAAa,EAClBxB,WAAW,CACZ;IACD,CAACsB,IAAI,CAACG,gBAAgB,EAAEzB,WAAW,CAAC,GAAGgB,uBAAuB,CAC5DC,KAAK,EACLK,IAAI,CAACG,gBAAgB,EACrBzB,WAAW,CACZ;EACH,CAAC,CAAC;EACF,OAAOA,WAAW;AACpB;AAAC"} \ No newline at end of file +{"version":3,"names":["_fs","data","require","_path","_debug","_t","_convertSourceMap","_file","_parser","_cloneDeep","file","traverseFast","debug","buildDebug","INLINE_SOURCEMAP_REGEX","EXTERNAL_SOURCEMAP_REGEX","normalizeFile","pluginPasses","options","code","ast","type","Error","cloneInputAst","cloneDeep","parser","inputMap","inputSourceMap","convertSourceMap","fromObject","lastComment","extractComments","fromComment","err","filename","match","exec","inputMapContent","fs","readFileSync","path","resolve","dirname","fromJSON","File","extractCommentsFromList","regex","comments","filter","value","test","node","leadingComments","innerComments","trailingComments"],"sources":["../../src/transformation/normalize-file.ts"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file\";\nimport parser from \"../parser\";\nimport cloneDeep from \"./util/clone-deep\";\n\nconst debug = buildDebug(\"babel:transform:file\");\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\n// eslint-disable-next-line max-len\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,(?:.*)$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: { [key: string]: any },\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n // @ts-expect-error todo: use babel-types ast typings in Babel parser\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(lastComment);\n } catch (err) {\n debug(\"discarding unknown inline input sourcemap\", err);\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n \"utf8\",\n );\n inputMap = convertSourceMap.fromJSON(inputMapContent);\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast as t.File,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,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ACvBC,IAAI;IACJC,GAAG,EAAEA,GAAa;IAClBM;EACF,CAAC,CAAC;AACJ;AAEA,SAASmB,uBAAuBA,CAC9BC,KAAa,EACbC,QAAqB,EACrBjB,WAA0B,EACI;EAC9B,IAAIiB,QAAQ,EAAE;IACZA,QAAQ,GAAGA,QAAQ,CAACC,MAAM,CAAC,CAAC;MAAEC;IAAM,CAAC,KAAK;MACxC,IAAIH,KAAK,CAACI,IAAI,CAACD,KAAK,CAAC,EAAE;QACrBnB,WAAW,GAAGmB,KAAK;QACnB,OAAO,KAAK;MACd;MACA,OAAO,IAAI;IACb,CAAC,CAAC;EACJ;EACA,OAAO,CAACF,QAAQ,EAAEjB,WAAW,CAAC;AAChC;AAEA,SAASC,eAAeA,CAACe,KAAa,EAAE1B,GAAW,EAAE;EACnD,IAAIU,WAAmB,GAAG,IAAI;EAC9BnB,YAAY,CAACS,GAAG,EAAE+B,IAAI,IAAI;IACxB,CAACA,IAAI,CAACC,eAAe,EAAEtB,WAAW,CAAC,GAAGe,uBAAuB,CAC3DC,KAAK,EACLK,IAAI,CAACC,eAAe,EACpBtB,WAAW,CACZ;IACD,CAACqB,IAAI,CAACE,aAAa,EAAEvB,WAAW,CAAC,GAAGe,uBAAuB,CACzDC,KAAK,EACLK,IAAI,CAACE,aAAa,EAClBvB,WAAW,CACZ;IACD,CAACqB,IAAI,CAACG,gBAAgB,EAAExB,WAAW,CAAC,GAAGe,uBAAuB,CAC5DC,KAAK,EACLK,IAAI,CAACG,gBAAgB,EACrBxB,WAAW,CACZ;EACH,CAAC,CAAC;EACF,OAAOA,WAAW;AACpB;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js.map b/node_modules/@babel/core/lib/transformation/normalize-opts.js.map index 7ff0d99ca..7cbad00bb 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-opts.js.map +++ b/node_modules/@babel/core/lib/transformation/normalize-opts.js.map @@ -1 +1 @@ -{"version":3,"names":["normalizeOptions","config","filename","cwd","filenameRelative","path","relative","sourceType","inputSourceMap","sourceMaps","sourceRoot","options","moduleRoot","sourceFileName","basename","comments","compact","opts","parserOpts","extname","plugins","generatorOpts","auxiliaryCommentBefore","auxiliaryCommentAfter","retainLines","shouldPrintComment","minified","passes","plugin","manipulateOptions"],"sources":["../../src/transformation/normalize-opts.ts"],"sourcesContent":["import path from \"path\";\nimport type { ResolvedConfig } from \"../config\";\n\nexport default function normalizeOptions(config: ResolvedConfig): {} {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n sourceMaps,\n\n sourceRoot,\n sourceFileName,\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGe,SAASA,gBAAgB,CAACC,MAAsB,EAAM;EACnE,MAAM;IACJC,QAAQ;IACRC,GAAG;IACHC,gBAAgB,GAAG,OAAOF,QAAQ,KAAK,QAAQ,GAC3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":3,"names":["_path","data","require","normalizeOptions","config","filename","cwd","filenameRelative","path","relative","sourceType","inputSourceMap","sourceMaps","sourceRoot","options","moduleRoot","sourceFileName","basename","comments","compact","opts","Object","assign","parserOpts","extname","plugins","generatorOpts","auxiliaryCommentBefore","auxiliaryCommentAfter","retainLines","shouldPrintComment","minified","passes","plugin","manipulateOptions"],"sources":["../../src/transformation/normalize-opts.ts"],"sourcesContent":["import path from \"path\";\nimport type { ResolvedConfig } from \"../config\";\n\nexport default function normalizeOptions(config: ResolvedConfig): {} {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n sourceMaps,\n\n sourceRoot,\n sourceFileName,\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGe,S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C,MAAM,IAAIR,OAAO,EAAE;MAC5B,IAAIQ,MAAM,CAACC,iBAAiB,EAAE;QAC5BD,MAAM,CAACC,iBAAiB,CAACpB,OAAO,EAAEA,OAAO,CAACS,UAAU,CAAC;MACvD;IACF;EACF;EAEA,OAAOT,OAAO;AAChB;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js index ddde8dc4a..15ef510e1 100644 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js +++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js @@ -31,7 +31,7 @@ class PluginPass { return this.file.addHelper(name); } addImport() { - return this.file.addImport(); + this.file.addImport(); } buildCodeFrameError(node, msg, _Error) { return this.file.buildCodeFrameError(node, msg, _Error); diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js.map b/node_modules/@babel/core/lib/transformation/plugin-pass.js.map index b7bca762d..54d5ebb05 100644 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js.map +++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js.map @@ -1 +1 @@ -{"version":3,"names":["PluginPass","constructor","file","key","options","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","addImport","buildCodeFrameError","node","msg","_Error","prototype","getModuleName"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type File from \"./file/file\";\nimport type { NodeLocation } from \"./file/file\";\n\nexport default class PluginPass {\n _map: Map = new Map();\n key: string | undefined | null;\n file: File;\n opts: any;\n\n // The working directory that Babel's programmatic options are loaded\n // relative to.\n cwd: string;\n\n // The absolute path of the file being compiled.\n filename: string | void;\n\n constructor(file: File, key?: string | null, options?: any | null) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n addImport() {\n return this.file.addImport();\n }\n\n buildCodeFrameError(\n node: NodeLocation | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName():\n | string\n | undefined {\n return this.file.getModuleName();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAC;EAa9BC,WAAW,CAACC,IAAU,EAAEC,GAAmB,EAAEC,OAAoB,EAAE;IAAA,KAZnEC,IAAI,GAA0B,IAAIC,GAAG,EAAE;IAAA,KACvCH,GAAG;IAAA,KACHD,IAAI;IAAA,KACJK,IAAI;IAAA,KAIJC,GAAG;IAAA,KAGHC,QAAQ;IAGN,IAAI,CAACN,GAAG,GAAGA,GAAG;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACK,IAAI,GAAGH,OAAO,IAAI,CAAC,CAAC;IACzB,IAAI,CAACI,GAAG,GAAGN,IAAI,CAACK,IAAI,CAACC,GAAG;IACxB,IAAI,CAACC,QAAQ,GAAGP,IAAI,CAACK,IAAI,CAACE,QAAQ;EACpC;EAEAC,GAAG,CAACP,GAAY,EAAEQ,GAAY,EAAE;IAC9B,IAAI,CAACN,IAAI,CAACK,GAAG,CAACP,GAAG,EAAEQ,GAAG,CAAC;EACzB;EAEAC,GAAG,CAACT,GAAY,EAAO;IACrB,OAAO,IAAI,CAACE,IAAI,CAACO,GAAG,CAACT,GAAG,CAAC;EAC3B;EAEAU,eAAe,CAACC,IAAY,EAAEC,YAA4B,EAAE;IAC1D,OAAO,IAAI,CAACb,IAAI,CAACW,eAAe,CAACC,IAAI,EAAEC,YAAY,CAAC;EACtD;EAEAC,SAAS,CAACF,IAAY,EAAE;IACtB,OAAO,IAAI,CAACZ,IAAI,CAACc,SAAS,CAACF,IAAI,CAAC;EAClC;EAEAG,SAAS,GAAG;IACV,OAAO,IAAI,CAACf,IAAI,CAACe,SAAS,EAAE;EAC9B;EAEAC,mBAAmB,CACjBC,IAAqC,EACrCC,GAAW,EACXC,MAAqB,EACrB;IACA,OAAO,IAAI,CAACnB,IAAI,CAACgB,mBAAmB,CAACC,IAAI,EAAEC,GAAG,EAAEC,MAAM,CAAC;EACzD;AACF;AAAC;AAEkC;EAChCrB,UAAU,CAASsB,SAAS,CAACC,aAAa,GAAG,SAASA,aAAa,GAEtD;IACZ,OAAO,IAAI,CAACrB,IAAI,CAACqB,aAAa,EAAE;EAClC,CAAC;AACH;AAAC"} \ No newline at end of file +{"version":3,"names":["PluginPass","constructor","file","key","options","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","addImport","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type File from \"./file/file\";\nimport type { NodeLocation } from \"./file/file\";\n\nexport default class PluginPass {\n _map: Map = new Map();\n key: string | undefined | null;\n file: File;\n opts: any;\n\n // The working directory that Babel's programmatic options are loaded\n // relative to.\n cwd: string;\n\n // The absolute path of the file being compiled.\n filename: string | void;\n\n constructor(file: File, key?: string | null, options?: any | null) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n // TODO: Remove this in Babel 8\n addImport() {\n this.file.addImport();\n }\n\n buildCodeFrameError(\n node: NodeLocation | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName():\n | string\n | undefined {\n return this.file.getModuleName();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAC;EAa9BC,WAAWA,CAACC,IAAU,EAAEC,GAAmB,EAAEC,OAAoB,EAAE;IAAA,KAZnEC,IAAI,GAA0B,IAAIC,GAAG,EAAE;IAAA,KACvCH,GAAG;IAAA,KACHD,IAAI;IAAA,KACJK,IAAI;IAAA,KAIJC,GAAG;IAAA,KAGHC,QAAQ;IAGN,IAAI,CAACN,GAAG,GAAGA,GAAG;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACK,IAAI,GAAGH,OAAO,IAAI,CAAC,CAAC;IACzB,IAAI,CAACI,GAAG,GAAGN,IAAI,CAACK,IAAI,CAACC,GAAG;IACxB,IAAI,CAACC,QAAQ,GAAGP,IAAI,CAACK,IAAI,CAACE,QAAQ;EACpC;EAEAC,GAAGA,CAACP,GAAY,EAAEQ,GAAY,EAAE;IAC9B,IAAI,CAACN,IAAI,CAACK,GAAG,CAACP,GAAG,EAAEQ,GAAG,CAAC;EACzB;EAEAC,GAAGA,CAACT,GAAY,EAAO;IACrB,OAAO,IAAI,CAACE,IAAI,CAACO,GAAG,CAACT,GAAG,CAAC;EAC3B;EAEAU,eAAeA,CAACC,IAAY,EAAEC,YAA4B,EAAE;IAC1D,OAAO,IAAI,CAACb,IAAI,CAACW,eAAe,CAACC,IAAI,EAAEC,YAAY,CAAC;EACtD;EAEAC,SAASA,CAACF,IAAY,EAAE;IACtB,OAAO,IAAI,CAACZ,IAAI,CAACc,SAAS,CAACF,IAAI,CAAC;EAClC;EAGAG,SAASA,CAAA,EAAG;IACV,IAAI,CAACf,IAAI,CAACe,SAAS,EAAE;EACvB;EAEAC,mBAAmBA,CACjBC,IAAqC,EACrCC,GAAW,EACXC,MAAqB,EACrB;IACA,OAAO,IAAI,CAACnB,IAAI,CAACgB,mBAAmB,CAACC,IAAI,EAAEC,GAAG,EAAEC,MAAM,CAAC;EACzD;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAvB,UAAA;AAEkC;EAChCA,UAAU,CAASwB,SAAS,CAACC,aAAa,GAAG,SAASA,aAAaA,CAAA,EAEtD;IACZ,OAAO,IAAI,CAACvB,IAAI,CAACuB,aAAa,EAAE;EAClC,CAAC;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js b/node_modules/@babel/core/lib/transformation/util/clone-deep.js index 94d0101b2..fc4148fc6 100644 --- a/node_modules/@babel/core/lib/transformation/util/clone-deep.js +++ b/node_modules/@babel/core/lib/transformation/util/clone-deep.js @@ -10,18 +10,19 @@ function deepClone(value, cache) { let cloned; if (Array.isArray(value)) { cloned = new Array(value.length); + cache.set(value, cloned); for (let i = 0; i < value.length; i++) { cloned[i] = typeof value[i] !== "object" ? value[i] : deepClone(value[i], cache); } } else { cloned = {}; + cache.set(value, cloned); const keys = Object.keys(value); for (let i = 0; i < keys.length; i++) { const key = keys[i]; cloned[key] = typeof value[key] !== "object" ? value[key] : deepClone(value[key], cache); } } - cache.set(value, cloned); return cloned; } return value; diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map b/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map index 8eda50867..ecf8953d1 100644 --- a/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map +++ b/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map @@ -1 +1 @@ -{"version":3,"names":["deepClone","value","cache","has","get","cloned","Array","isArray","length","i","keys","Object","key","set","Map"],"sources":["../../../src/transformation/util/clone-deep.ts"],"sourcesContent":["//https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(value: any, cache: Map): any {\n if (value !== null) {\n if (cache.has(value)) return cache.get(value);\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\" ? value[i] : deepClone(value[i], cache);\n }\n } else {\n cloned = {};\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(value[key], cache);\n }\n }\n cache.set(value, cloned);\n return cloned;\n }\n return value;\n}\n\nexport default function (value: T): T {\n if (typeof value !== \"object\") return value;\n return deepClone(value, new Map());\n}\n"],"mappings":";;;;;;AACA,SAASA,SAAS,CAACC,KAAU,EAAEC,KAAoB,EAAO;EACxD,IAAID,KAAK,KAAK,IAAI,EAAE;IAClB,IAAIC,KAAK,CAACC,GAAG,CAACF,KAAK,CAAC,EAAE,OAAOC,KAAK,CAACE,GAAG,CAACH,KAAK,CAAC;IAC7C,IAAII,MAAW;IACf,IAAIC,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,EAAE;MACxBI,MAAM,GAAG,IAAIC,KAAK,CAACL,KAAK,CAACO,MAAM,CAAC;MAChC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGR,KAAK,CAACO,MAAM,EAAEC,CAAC,EAAE,EAAE;QACrCJ,MAAM,CAACI,CAAC,CAAC,GACP,OAAOR,KAAK,CAACQ,CAAC,CAAC,KAAK,QAAQ,GAAGR,KAAK,CAACQ,CAAC,CAAC,GAAGT,SAAS,CAACC,KAAK,CAACQ,CAAC,CAAC,EAAEP,KAAK,CAAC;MACxE;IACF,CAAC,MAAM;MACLG,MAAM,GAAG,CAAC,CAAC;MACX,MAAMK,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACT,KAAK,CAAC;MAC/B,KAAK,IAAIQ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACF,MAAM,EAAEC,CAAC,EAAE,EAAE;QACpC,MAAMG,GAAG,GAAGF,IAAI,CAACD,CAAC,CAAC;QACnBJ,MAAM,CAACO,GAAG,CAAC,GACT,OAAOX,KAAK,CAACW,GAAG,CAAC,KAAK,QAAQ,GAC1BX,KAAK,CAACW,GAAG,CAAC,GACVZ,SAAS,CAACC,KAAK,CAACW,GAAG,CAAC,EAAEV,KAAK,CAAC;MACpC;IACF;IACAA,KAAK,CAACW,GAAG,CAACZ,KAAK,EAAEI,MAAM,CAAC;IACxB,OAAOA,MAAM;EACf;EACA,OAAOJ,KAAK;AACd;AAEe,kBAAaA,KAAQ,EAAK;EACvC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAOD,SAAS,CAACC,KAAK,EAAE,IAAIa,GAAG,EAAE,CAAC;AACpC;AAAC"} \ No newline at end of file +{"version":3,"names":["deepClone","value","cache","has","get","cloned","Array","isArray","length","set","i","keys","Object","key","_default","Map"],"sources":["../../../src/transformation/util/clone-deep.ts"],"sourcesContent":["//https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(value: any, cache: Map): any {\n if (value !== null) {\n if (cache.has(value)) return cache.get(value);\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n cache.set(value, cloned);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\" ? value[i] : deepClone(value[i], cache);\n }\n } else {\n cloned = {};\n cache.set(value, cloned);\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(value[key], cache);\n }\n }\n return cloned;\n }\n return value;\n}\n\nexport default function (value: T): T {\n if (typeof value !== \"object\") return value;\n return deepClone(value, new Map());\n}\n"],"mappings":";;;;;;AACA,SAASA,SAASA,CAACC,KAAU,EAAEC,KAAoB,EAAO;EACxD,IAAID,KAAK,KAAK,IAAI,EAAE;IAClB,IAAIC,KAAK,CAACC,GAAG,CAACF,KAAK,CAAC,EAAE,OAAOC,KAAK,CAACE,GAAG,CAACH,KAAK,CAAC;IAC7C,IAAII,MAAW;IACf,IAAIC,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,EAAE;MACxBI,MAAM,GAAG,IAAIC,KAAK,CAACL,KAAK,CAACO,MAAM,CAAC;MAChCN,KAAK,CAACO,GAAG,CAACR,KAAK,EAAEI,MAAM,CAAC;MACxB,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGT,KAAK,CAACO,MAAM,EAAEE,CAAC,EAAE,EAAE;QACrCL,MAAM,CAACK,CAAC,CAAC,GACP,OAAOT,KAAK,CAACS,CAAC,CAAC,KAAK,QAAQ,GAAGT,KAAK,CAACS,CAAC,CAAC,GAAGV,SAAS,CAACC,KAAK,CAACS,CAAC,CAAC,EAAER,KAAK,CAAC;MACxE;IACF,CAAC,MAAM;MACLG,MAAM,GAAG,CAAC,CAAC;MACXH,KAAK,CAACO,GAAG,CAACR,KAAK,EAAEI,MAAM,CAAC;MACxB,MAAMM,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACV,KAAK,CAAC;MAC/B,KAAK,IAAIS,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACH,MAAM,EAAEE,CAAC,EAAE,EAAE;QACpC,MAAMG,GAAG,GAAGF,IAAI,CAACD,CAAC,CAAC;QACnBL,MAAM,CAACQ,GAAG,CAAC,GACT,OAAOZ,KAAK,CAACY,GAAG,CAAC,KAAK,QAAQ,GAC1BZ,KAAK,CAACY,GAAG,CAAC,GACVb,SAAS,CAACC,KAAK,CAACY,GAAG,CAAC,EAAEX,KAAK,CAAC;MACpC;IACF;IACA,OAAOG,MAAM;EACf;EACA,OAAOJ,KAAK;AACd;AAEe,SAAAa,SAAab,KAAQ,EAAK;EACvC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAOD,SAAS,CAACC,KAAK,EAAE,IAAIc,GAAG,EAAE,CAAC;AACpC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map index ced154c3e..ccccfa3ea 100644 --- a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map +++ b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map @@ -1 +1 @@ -{"version":3,"names":["re$3","exports","SEMVER_SPEC_VERSION","MAX_LENGTH$2","MAX_SAFE_INTEGER$1","Number","MAX_SAFE_INTEGER","MAX_SAFE_COMPONENT_LENGTH","constants","MAX_LENGTH","debug$1","process","env","NODE_DEBUG","test","args","console","error","debug_1","module","debug","re","src","t","R","createToken","name","value","isGlobal","index","RegExp","undefined","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCE","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","opts","parseOptions$2","options","loose","filter","k","reduce","o","parseOptions_1","numeric","compareIdentifiers$1","a","b","anum","bnum","rcompareIdentifiers","identifiers","compareIdentifiers","MAX_LENGTH$1","re$2","t$2","parseOptions$1","SemVer$c","constructor","version","includePrerelease","TypeError","length","m","trim","match","LOOSE","FULL","raw","major","minor","patch","prerelease","split","map","id","num","build","format","join","toString","compare","other","compareMain","comparePre","i","compareBuild","inc","release","identifier","push","isNaN","Error","semver$2","re$1","t$1","SemVer$b","parseOptions","parse$5","r","er","parse_1","parse$4","valid$1","v","valid_1","parse$3","clean","s","replace","clean_1","SemVer$a","inc_1","SemVer$9","compare$a","compare_1","compare$9","eq$2","eq_1","parse$2","eq$1","diff","version1","version2","v1","v2","hasPre","prefix","defaultResult","key","diff_1","SemVer$8","major_1","SemVer$7","minor_1","SemVer$6","patch_1","parse$1","parsed","prerelease_1","compare$8","rcompare","rcompare_1","compare$7","compareLoose","compareLoose_1","SemVer$5","compareBuild$2","versionA","versionB","compareBuild_1","compareBuild$1","sort","list","sort_1","rsort","rsort_1","compare$6","gt$3","gt_1","compare$5","lt$2","lt_1","compare$4","neq$1","neq_1","compare$3","gte$2","gte_1","compare$2","lte$2","lte_1","eq","neq","gt$2","gte$1","lt$1","lte$1","cmp","op","cmp_1","SemVer$4","parse","coerce","String","rtl","next","COERCERTL","exec","lastIndex","coerce_1","iterator","hasRequiredIterator","requireIterator","Yallist","prototype","Symbol","walker","head","yallist","hasRequiredYallist","requireYallist","Node","create","self","tail","forEach","item","arguments","l","removeNode","node","prev","unshiftNode","pushNode","unshift","pop","res","shift","fn","thisp","call","forEachReverse","get","n","getReverse","mapReverse","initial","acc","reduceReverse","toArray","arr","Array","toArrayReverse","slice","from","to","ret","sliceReverse","splice","start","deleteCount","nodes","insert","reverse","p","inserted","lruCache","hasRequiredLruCache","requireLruCache","MAX","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","max","Infinity","lc","stale","maxAge","dispose","noDisposeOnSet","updateAgeOnGet","reset","mL","allowStale","mA","lengthCalculator","lC","hit","itemCount","rforEach","forEachStep","keys","values","Map","dump","isStale","e","now","h","dumpLru","set","Date","len","has","del","Entry","peek","load","expiresAt","prune","doUse","delete","range","hasRequiredRange","requireRange","Range","Comparator","parseRange","c","first","isNullSet","isAny","comps","memoOpts","Object","memoKey","cached","cache","hr","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","TILDETRIM","CARETTRIM","rangeList","comp","parseComparator","replaceGTE0","COMPARATORLOOSE","rangeMap","comparators","size","result","intersects","some","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","LRU","requireComparator","remainingComparators","testComparator","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","toLowerCase","replaceTilde","TILDELOOSE","TILDE","_","M","pr","replaceCaret","CARETLOOSE","CARET","z","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","anyX","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","tM","tm","tp","tpr","tb","semver","ANY","allowed","comparator","hasRequiredComparator","operator","COMPARATOR","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","Range$8","satisfies$3","satisfies_1","Range$7","toComparators","toComparators_1","SemVer$3","Range$6","maxSatisfying","versions","maxSV","rangeObj","maxSatisfying_1","SemVer$2","Range$5","minSatisfying","min","minSV","minSatisfying_1","SemVer$1","Range$4","gt$1","minVersion","minver","setMin","compver","minVersion_1","Range$3","validRange","valid","Comparator$1","ANY$1","Range$2","satisfies$2","gt","lt","lte","gte","outside$2","hilo","gtfn","ltefn","ltfn","ecomp","high","low","outside_1","outside$1","gtr","gtr_1","outside","ltr","ltr_1","Range$1","r1","r2","intersects_1","satisfies$1","compare$1","simplify","included","ranges","simplified","original","satisfies","subset","sub","dom","sawNonNull","OUTER","simpleSub","simpleDom","isSub","simpleSubset","eqSet","Set","higherGT","lowerLT","add","gtltComp","higher","lower","hasDomLT","hasDomGT","needDomLTPre","needDomGTPre","subset_1","internalRe","semver$1","tokens","simplifyRange","builtins","experimental","coreModules","reader","read","jsonPath","find","path","dirname","dir","string","fs","readFileSync","toNamespacedPath","code","parent","isWindows","platform","own$1","hasOwnProperty","codes","messages","nodeInternalPrefix","userStackTraceLimit","ERR_INVALID_MODULE_SPECIFIER","createError","request","reason","base","ERR_INVALID_PACKAGE_CONFIG","message","ERR_INVALID_PACKAGE_TARGET","pkgPath","target","isImport","relError","startsWith","assert","JSON","stringify","ERR_MODULE_NOT_FOUND","type","ERR_PACKAGE_IMPORT_NOT_DEFINED","specifier","packagePath","ERR_PACKAGE_PATH_NOT_EXPORTED","subpath","ERR_UNSUPPORTED_DIR_IMPORT","ERR_UNKNOWN_FILE_EXTENSION","ERR_INVALID_ARG_VALUE","inspected","inspect","includes","ERR_UNSUPPORTED_ESM_URL_SCHEME","url","protocol","sym","def","makeNodeErrorWithCode","Base","NodeError","limit","stackTraceLimit","isErrorStackTraceLimitWritable","getMessage","defineProperty","enumerable","writable","configurable","addCodeToName","hideStackFrames","captureLargerStackTrace","stack","desc","getOwnPropertyDescriptor","isExtensible","hidden","stackTraceLimitIsWritable","POSITIVE_INFINITY","captureStackTrace","Reflect","apply","expectedLength","extensionFormatMap","__proto__","defaultGetFormat","URL","mime","pathname","ext","extname","getPackageType","href","fileURLToPath","listOfBuiltins","own","DEFAULT_CONDITIONS","freeze","DEFAULT_CONDITIONS_SET","invalidSegmentRegEx","patternRegEx","encodedSepRegEx","emittedPackageWarnings","packageJsonCache","emitFolderMapDeprecation","pjsonUrl","isExports","pjsonPath","emitWarning","emitLegacyIndexDeprecation","packageJsonUrl","main","basePath","getConditionsSet","conditions","isArray","tryStatSync","statSync","Stats","getPackageConfig","existing","source","packageConfig","exists","imports","packageJson","getPackageScopeConfig","resolved","packageJsonPath","endsWith","lastPackageJsonUrl","fileExists","isFile","legacyMainResolve","guess","tries","finalizeResolution","stats","isDirectory","throwImportNotDefined","throwExportsNotFound","throwInvalidSubpath","internal","throwInvalidPackageTarget","resolvePackageTargetString","pattern","isURL","exportTarget","packageResolve","resolvedPath","isArrayIndex","keyNumber","resolvePackageTarget","packageSubpath","targetList","lastException","targetItem","getOwnPropertyNames","conditionalTarget","isConditionalExportsMainSugar","isConditionalSugar","j","curIsConditionalSugar","packageExportsResolve","exact","bestMatch","packageImportsResolve","pathToFileURL","parsePackageName","separatorIndex","indexOf","validPackageName","isScoped","packageName","lastPath","stat","isRelativeSpecifier","shouldBeTreatedAsRelativeOrAbsolutePath","moduleResolve","defaultResolve","context","parentURL","urlPath","real","realpathSync","old","sep","search","hash","resolve","Promise","reject"],"sources":["../../src/vendor/import-meta-resolve.js"],"sourcesContent":["\n/****************************************************************************\\\n * NOTE FROM BABEL AUTHORS *\n * This file is inlined from https://github.com/wooorm/import-meta-resolve, *\n * because we need to compile it to CommonJS. *\n\\****************************************************************************/\n\n/*\n(The MIT License)\n\nCopyright (c) 2021 Titus Wormer \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\n\nThis is a derivative work based on:\n.\nWhich is licensed:\n\n\"\"\"\nCopyright Node.js contributors. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n\nThis license applies to parts of Node.js originating from the\nhttps://github.com/joyent/node repository:\n\n\"\"\"\nCopyright Joyent, Inc. and other Node contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n*/\n\nimport { URL, fileURLToPath, pathToFileURL } from 'url';\nimport fs, { realpathSync, statSync, Stats } from 'fs';\nimport path from 'path';\nimport assert from 'assert';\nimport { format, inspect } from 'util';\n\nvar re$3 = {exports: {}};\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0';\n\nconst MAX_LENGTH$2 = 256;\nconst MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991;\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16;\n\nvar constants = {\n SEMVER_SPEC_VERSION,\n MAX_LENGTH: MAX_LENGTH$2,\n MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,\n MAX_SAFE_COMPONENT_LENGTH,\n};\n\nconst debug$1 = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {};\n\nvar debug_1 = debug$1;\n\n(function (module, exports) {\n\tconst { MAX_SAFE_COMPONENT_LENGTH } = constants;\n\tconst debug = debug_1;\n\texports = module.exports = {};\n\n\t// The actual regexps go on exports.re\n\tconst re = exports.re = [];\n\tconst src = exports.src = [];\n\tconst t = exports.t = {};\n\tlet R = 0;\n\n\tconst createToken = (name, value, isGlobal) => {\n\t const index = R++;\n\t debug(name, index, value);\n\t t[name] = index;\n\t src[index] = value;\n\t re[index] = new RegExp(value, isGlobal ? 'g' : undefined);\n\t};\n\n\t// The following Regular Expressions can be used for tokenizing,\n\t// validating, and parsing SemVer version strings.\n\n\t// ## Numeric Identifier\n\t// A single `0`, or a non-zero digit followed by zero or more digits.\n\n\tcreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*');\n\tcreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');\n\n\t// ## Non-numeric Identifier\n\t// Zero or more digits, followed by a letter or hyphen, and then zero or\n\t// more letters, digits, or hyphens.\n\n\tcreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*');\n\n\t// ## Main Version\n\t// Three dot-separated numeric identifiers.\n\n\tcreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIER]})`);\n\n\tcreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIERLOOSE]})`);\n\n\t// ## Pre-release Version Identifier\n\t// A numeric identifier, or a non-numeric identifier.\n\n\tcreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n\t}|${src[t.NONNUMERICIDENTIFIER]})`);\n\n\tcreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n\t}|${src[t.NONNUMERICIDENTIFIER]})`);\n\n\t// ## Pre-release Version\n\t// Hyphen, followed by one or more dot-separated pre-release version\n\t// identifiers.\n\n\tcreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n\t}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`);\n\n\tcreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n\t}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);\n\n\t// ## Build Metadata Identifier\n\t// Any combination of digits, letters, or hyphens.\n\n\tcreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');\n\n\t// ## Build Metadata\n\t// Plus sign, followed by one or more period-separated build metadata\n\t// identifiers.\n\n\tcreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n\t}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`);\n\n\t// ## Full Version String\n\t// A main version, followed optionally by a pre-release version and\n\t// build metadata.\n\n\t// Note that the only major, minor, patch, and pre-release sections of\n\t// the version string are capturing groups. The build metadata is not a\n\t// capturing group, because it should not ever be used in version\n\t// comparison.\n\n\tcreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n\t}${src[t.PRERELEASE]}?${\n\t src[t.BUILD]}?`);\n\n\tcreateToken('FULL', `^${src[t.FULLPLAIN]}$`);\n\n\t// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n\t// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n\t// common in the npm registry.\n\tcreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n\t}${src[t.PRERELEASELOOSE]}?${\n\t src[t.BUILD]}?`);\n\n\tcreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);\n\n\tcreateToken('GTLT', '((?:<|>)?=?)');\n\n\t// Something like \"2.*\" or \"1.2.x\".\n\t// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n\t// Only the first item is strictly required.\n\tcreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n\tcreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n\n\tcreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n\t `(?:${src[t.PRERELEASE]})?${\n\t src[t.BUILD]}?` +\n\t `)?)?`);\n\n\tcreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n\t `(?:${src[t.PRERELEASELOOSE]})?${\n\t src[t.BUILD]}?` +\n\t `)?)?`);\n\n\tcreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`);\n\tcreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`);\n\n\t// Coercion.\n\t// Extract anything that could conceivably be a part of a valid semver\n\tcreateToken('COERCE', `${'(^|[^\\\\d])' +\n\t '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n\t `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n\t `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n\t `(?:$|[^\\\\d])`);\n\tcreateToken('COERCERTL', src[t.COERCE], true);\n\n\t// Tilde ranges.\n\t// Meaning is \"reasonably at or greater than\"\n\tcreateToken('LONETILDE', '(?:~>?)');\n\n\tcreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true);\n\texports.tildeTrimReplace = '$1~';\n\n\tcreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);\n\n\t// Caret ranges.\n\t// Meaning is \"at least and backwards compatible with\"\n\tcreateToken('LONECARET', '(?:\\\\^)');\n\n\tcreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true);\n\texports.caretTrimReplace = '$1^';\n\n\tcreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);\n\n\t// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\n\tcreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`);\n\tcreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`);\n\n\t// An expression to strip any whitespace between the gtlt and the thing\n\t// it modifies, so that `> 1.2.3` ==> `>1.2.3`\n\tcreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n\t}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);\n\texports.comparatorTrimReplace = '$1$2$3';\n\n\t// Something like `1.2.3 - 1.2.4`\n\t// Note that these all use the loose form, because they'll be\n\t// checked against either the strict or loose comparator form\n\t// later.\n\tcreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n\t `\\\\s+-\\\\s+` +\n\t `(${src[t.XRANGEPLAIN]})` +\n\t `\\\\s*$`);\n\n\tcreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n\t `\\\\s+-\\\\s+` +\n\t `(${src[t.XRANGEPLAINLOOSE]})` +\n\t `\\\\s*$`);\n\n\t// Star ranges basically just allow anything at all.\n\tcreateToken('STAR', '(<|>)?=?\\\\s*\\\\*');\n\t// >=0.0.0 is like a star\n\tcreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$');\n\tcreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$');\n} (re$3, re$3.exports));\n\n// parse out just the options we care about so we always get a consistent\n// obj with keys in a consistent order.\nconst opts = ['includePrerelease', 'loose', 'rtl'];\nconst parseOptions$2 = options =>\n !options ? {}\n : typeof options !== 'object' ? { loose: true }\n : opts.filter(k => options[k]).reduce((o, k) => {\n o[k] = true;\n return o\n }, {});\nvar parseOptions_1 = parseOptions$2;\n\nconst numeric = /^[0-9]+$/;\nconst compareIdentifiers$1 = (a, b) => {\n const anum = numeric.test(a);\n const bnum = numeric.test(b);\n\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n};\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);\n\nvar identifiers = {\n compareIdentifiers: compareIdentifiers$1,\n rcompareIdentifiers,\n};\n\nconst debug = debug_1;\nconst { MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_INTEGER } = constants;\nconst { re: re$2, t: t$2 } = re$3.exports;\n\nconst parseOptions$1 = parseOptions_1;\nconst { compareIdentifiers } = identifiers;\nclass SemVer$c {\n constructor (version, options) {\n options = parseOptions$1(options);\n\n if (version instanceof SemVer$c) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version;\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH$1) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH$1} characters`\n )\n }\n\n debug('SemVer', version, options);\n this.options = options;\n this.loose = !!options.loose;\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease;\n\n const m = version.trim().match(options.loose ? re$2[t$2.LOOSE] : re$2[t$2.FULL]);\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version;\n\n // these are actually numbers\n this.major = +m[1];\n this.minor = +m[2];\n this.patch = +m[3];\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id;\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n });\n }\n\n this.build = m[5] ? m[5].split('.') : [];\n this.format();\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`;\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other);\n if (!(other instanceof SemVer$c)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer$c(other, this.options);\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer$c)) {\n other = new SemVer$c(other, this.options);\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer$c)) {\n other = new SemVer$c(other, this.options);\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0;\n do {\n const a = this.prerelease[i];\n const b = other.prerelease[i];\n debug('prerelease compare', i, a, b);\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer$c)) {\n other = new SemVer$c(other, this.options);\n }\n\n let i = 0;\n do {\n const a = this.build[i];\n const b = other.build[i];\n debug('prerelease compare', i, a, b);\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc('pre', identifier);\n break\n case 'preminor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc('pre', identifier);\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0;\n this.inc('patch', identifier);\n this.inc('pre', identifier);\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier);\n }\n this.inc('pre', identifier);\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0];\n } else {\n let i = this.prerelease.length;\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++;\n i = -2;\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0);\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0];\n }\n } else {\n this.prerelease = [identifier, 0];\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format();\n this.raw = this.version;\n return this\n }\n}\n\nvar semver$2 = SemVer$c;\n\nconst { MAX_LENGTH } = constants;\nconst { re: re$1, t: t$1 } = re$3.exports;\nconst SemVer$b = semver$2;\n\nconst parseOptions = parseOptions_1;\nconst parse$5 = (version, options) => {\n options = parseOptions(options);\n\n if (version instanceof SemVer$b) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n const r = options.loose ? re$1[t$1.LOOSE] : re$1[t$1.FULL];\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer$b(version, options)\n } catch (er) {\n return null\n }\n};\n\nvar parse_1 = parse$5;\n\nconst parse$4 = parse_1;\nconst valid$1 = (version, options) => {\n const v = parse$4(version, options);\n return v ? v.version : null\n};\nvar valid_1 = valid$1;\n\nconst parse$3 = parse_1;\nconst clean = (version, options) => {\n const s = parse$3(version.trim().replace(/^[=v]+/, ''), options);\n return s ? s.version : null\n};\nvar clean_1 = clean;\n\nconst SemVer$a = semver$2;\n\nconst inc = (version, release, options, identifier) => {\n if (typeof (options) === 'string') {\n identifier = options;\n options = undefined;\n }\n\n try {\n return new SemVer$a(\n version instanceof SemVer$a ? version.version : version,\n options\n ).inc(release, identifier).version\n } catch (er) {\n return null\n }\n};\nvar inc_1 = inc;\n\nconst SemVer$9 = semver$2;\nconst compare$a = (a, b, loose) =>\n new SemVer$9(a, loose).compare(new SemVer$9(b, loose));\n\nvar compare_1 = compare$a;\n\nconst compare$9 = compare_1;\nconst eq$2 = (a, b, loose) => compare$9(a, b, loose) === 0;\nvar eq_1 = eq$2;\n\nconst parse$2 = parse_1;\nconst eq$1 = eq_1;\n\nconst diff = (version1, version2) => {\n if (eq$1(version1, version2)) {\n return null\n } else {\n const v1 = parse$2(version1);\n const v2 = parse$2(version2);\n const hasPre = v1.prerelease.length || v2.prerelease.length;\n const prefix = hasPre ? 'pre' : '';\n const defaultResult = hasPre ? 'prerelease' : '';\n for (const key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n};\nvar diff_1 = diff;\n\nconst SemVer$8 = semver$2;\nconst major = (a, loose) => new SemVer$8(a, loose).major;\nvar major_1 = major;\n\nconst SemVer$7 = semver$2;\nconst minor = (a, loose) => new SemVer$7(a, loose).minor;\nvar minor_1 = minor;\n\nconst SemVer$6 = semver$2;\nconst patch = (a, loose) => new SemVer$6(a, loose).patch;\nvar patch_1 = patch;\n\nconst parse$1 = parse_1;\nconst prerelease = (version, options) => {\n const parsed = parse$1(version, options);\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n};\nvar prerelease_1 = prerelease;\n\nconst compare$8 = compare_1;\nconst rcompare = (a, b, loose) => compare$8(b, a, loose);\nvar rcompare_1 = rcompare;\n\nconst compare$7 = compare_1;\nconst compareLoose = (a, b) => compare$7(a, b, true);\nvar compareLoose_1 = compareLoose;\n\nconst SemVer$5 = semver$2;\nconst compareBuild$2 = (a, b, loose) => {\n const versionA = new SemVer$5(a, loose);\n const versionB = new SemVer$5(b, loose);\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n};\nvar compareBuild_1 = compareBuild$2;\n\nconst compareBuild$1 = compareBuild_1;\nconst sort = (list, loose) => list.sort((a, b) => compareBuild$1(a, b, loose));\nvar sort_1 = sort;\n\nconst compareBuild = compareBuild_1;\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));\nvar rsort_1 = rsort;\n\nconst compare$6 = compare_1;\nconst gt$3 = (a, b, loose) => compare$6(a, b, loose) > 0;\nvar gt_1 = gt$3;\n\nconst compare$5 = compare_1;\nconst lt$2 = (a, b, loose) => compare$5(a, b, loose) < 0;\nvar lt_1 = lt$2;\n\nconst compare$4 = compare_1;\nconst neq$1 = (a, b, loose) => compare$4(a, b, loose) !== 0;\nvar neq_1 = neq$1;\n\nconst compare$3 = compare_1;\nconst gte$2 = (a, b, loose) => compare$3(a, b, loose) >= 0;\nvar gte_1 = gte$2;\n\nconst compare$2 = compare_1;\nconst lte$2 = (a, b, loose) => compare$2(a, b, loose) <= 0;\nvar lte_1 = lte$2;\n\nconst eq = eq_1;\nconst neq = neq_1;\nconst gt$2 = gt_1;\nconst gte$1 = gte_1;\nconst lt$1 = lt_1;\nconst lte$1 = lte_1;\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version;\n }\n if (typeof b === 'object') {\n b = b.version;\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version;\n }\n if (typeof b === 'object') {\n b = b.version;\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt$2(a, b, loose)\n\n case '>=':\n return gte$1(a, b, loose)\n\n case '<':\n return lt$1(a, b, loose)\n\n case '<=':\n return lte$1(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n};\nvar cmp_1 = cmp;\n\nconst SemVer$4 = semver$2;\nconst parse = parse_1;\nconst { re, t } = re$3.exports;\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer$4) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version);\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {};\n\n let match = null;\n if (!options.rtl) {\n match = version.match(re[t.COERCE]);\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next;\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next;\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1;\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n};\nvar coerce_1 = coerce;\n\nvar iterator;\nvar hasRequiredIterator;\n\nfunction requireIterator () {\n\tif (hasRequiredIterator) return iterator;\n\thasRequiredIterator = 1;\n\titerator = function (Yallist) {\n\t Yallist.prototype[Symbol.iterator] = function* () {\n\t for (let walker = this.head; walker; walker = walker.next) {\n\t yield walker.value;\n\t }\n\t };\n\t};\n\treturn iterator;\n}\n\nvar yallist;\nvar hasRequiredYallist;\n\nfunction requireYallist () {\n\tif (hasRequiredYallist) return yallist;\n\thasRequiredYallist = 1;\n\tyallist = Yallist;\n\n\tYallist.Node = Node;\n\tYallist.create = Yallist;\n\n\tfunction Yallist (list) {\n\t var self = this;\n\t if (!(self instanceof Yallist)) {\n\t self = new Yallist();\n\t }\n\n\t self.tail = null;\n\t self.head = null;\n\t self.length = 0;\n\n\t if (list && typeof list.forEach === 'function') {\n\t list.forEach(function (item) {\n\t self.push(item);\n\t });\n\t } else if (arguments.length > 0) {\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t self.push(arguments[i]);\n\t }\n\t }\n\n\t return self\n\t}\n\n\tYallist.prototype.removeNode = function (node) {\n\t if (node.list !== this) {\n\t throw new Error('removing node which does not belong to this list')\n\t }\n\n\t var next = node.next;\n\t var prev = node.prev;\n\n\t if (next) {\n\t next.prev = prev;\n\t }\n\n\t if (prev) {\n\t prev.next = next;\n\t }\n\n\t if (node === this.head) {\n\t this.head = next;\n\t }\n\t if (node === this.tail) {\n\t this.tail = prev;\n\t }\n\n\t node.list.length--;\n\t node.next = null;\n\t node.prev = null;\n\t node.list = null;\n\n\t return next\n\t};\n\n\tYallist.prototype.unshiftNode = function (node) {\n\t if (node === this.head) {\n\t return\n\t }\n\n\t if (node.list) {\n\t node.list.removeNode(node);\n\t }\n\n\t var head = this.head;\n\t node.list = this;\n\t node.next = head;\n\t if (head) {\n\t head.prev = node;\n\t }\n\n\t this.head = node;\n\t if (!this.tail) {\n\t this.tail = node;\n\t }\n\t this.length++;\n\t};\n\n\tYallist.prototype.pushNode = function (node) {\n\t if (node === this.tail) {\n\t return\n\t }\n\n\t if (node.list) {\n\t node.list.removeNode(node);\n\t }\n\n\t var tail = this.tail;\n\t node.list = this;\n\t node.prev = tail;\n\t if (tail) {\n\t tail.next = node;\n\t }\n\n\t this.tail = node;\n\t if (!this.head) {\n\t this.head = node;\n\t }\n\t this.length++;\n\t};\n\n\tYallist.prototype.push = function () {\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t push(this, arguments[i]);\n\t }\n\t return this.length\n\t};\n\n\tYallist.prototype.unshift = function () {\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t unshift(this, arguments[i]);\n\t }\n\t return this.length\n\t};\n\n\tYallist.prototype.pop = function () {\n\t if (!this.tail) {\n\t return undefined\n\t }\n\n\t var res = this.tail.value;\n\t this.tail = this.tail.prev;\n\t if (this.tail) {\n\t this.tail.next = null;\n\t } else {\n\t this.head = null;\n\t }\n\t this.length--;\n\t return res\n\t};\n\n\tYallist.prototype.shift = function () {\n\t if (!this.head) {\n\t return undefined\n\t }\n\n\t var res = this.head.value;\n\t this.head = this.head.next;\n\t if (this.head) {\n\t this.head.prev = null;\n\t } else {\n\t this.tail = null;\n\t }\n\t this.length--;\n\t return res\n\t};\n\n\tYallist.prototype.forEach = function (fn, thisp) {\n\t thisp = thisp || this;\n\t for (var walker = this.head, i = 0; walker !== null; i++) {\n\t fn.call(thisp, walker.value, i, this);\n\t walker = walker.next;\n\t }\n\t};\n\n\tYallist.prototype.forEachReverse = function (fn, thisp) {\n\t thisp = thisp || this;\n\t for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n\t fn.call(thisp, walker.value, i, this);\n\t walker = walker.prev;\n\t }\n\t};\n\n\tYallist.prototype.get = function (n) {\n\t for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n\t // abort out of the list early if we hit a cycle\n\t walker = walker.next;\n\t }\n\t if (i === n && walker !== null) {\n\t return walker.value\n\t }\n\t};\n\n\tYallist.prototype.getReverse = function (n) {\n\t for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n\t // abort out of the list early if we hit a cycle\n\t walker = walker.prev;\n\t }\n\t if (i === n && walker !== null) {\n\t return walker.value\n\t }\n\t};\n\n\tYallist.prototype.map = function (fn, thisp) {\n\t thisp = thisp || this;\n\t var res = new Yallist();\n\t for (var walker = this.head; walker !== null;) {\n\t res.push(fn.call(thisp, walker.value, this));\n\t walker = walker.next;\n\t }\n\t return res\n\t};\n\n\tYallist.prototype.mapReverse = function (fn, thisp) {\n\t thisp = thisp || this;\n\t var res = new Yallist();\n\t for (var walker = this.tail; walker !== null;) {\n\t res.push(fn.call(thisp, walker.value, this));\n\t walker = walker.prev;\n\t }\n\t return res\n\t};\n\n\tYallist.prototype.reduce = function (fn, initial) {\n\t var acc;\n\t var walker = this.head;\n\t if (arguments.length > 1) {\n\t acc = initial;\n\t } else if (this.head) {\n\t walker = this.head.next;\n\t acc = this.head.value;\n\t } else {\n\t throw new TypeError('Reduce of empty list with no initial value')\n\t }\n\n\t for (var i = 0; walker !== null; i++) {\n\t acc = fn(acc, walker.value, i);\n\t walker = walker.next;\n\t }\n\n\t return acc\n\t};\n\n\tYallist.prototype.reduceReverse = function (fn, initial) {\n\t var acc;\n\t var walker = this.tail;\n\t if (arguments.length > 1) {\n\t acc = initial;\n\t } else if (this.tail) {\n\t walker = this.tail.prev;\n\t acc = this.tail.value;\n\t } else {\n\t throw new TypeError('Reduce of empty list with no initial value')\n\t }\n\n\t for (var i = this.length - 1; walker !== null; i--) {\n\t acc = fn(acc, walker.value, i);\n\t walker = walker.prev;\n\t }\n\n\t return acc\n\t};\n\n\tYallist.prototype.toArray = function () {\n\t var arr = new Array(this.length);\n\t for (var i = 0, walker = this.head; walker !== null; i++) {\n\t arr[i] = walker.value;\n\t walker = walker.next;\n\t }\n\t return arr\n\t};\n\n\tYallist.prototype.toArrayReverse = function () {\n\t var arr = new Array(this.length);\n\t for (var i = 0, walker = this.tail; walker !== null; i++) {\n\t arr[i] = walker.value;\n\t walker = walker.prev;\n\t }\n\t return arr\n\t};\n\n\tYallist.prototype.slice = function (from, to) {\n\t to = to || this.length;\n\t if (to < 0) {\n\t to += this.length;\n\t }\n\t from = from || 0;\n\t if (from < 0) {\n\t from += this.length;\n\t }\n\t var ret = new Yallist();\n\t if (to < from || to < 0) {\n\t return ret\n\t }\n\t if (from < 0) {\n\t from = 0;\n\t }\n\t if (to > this.length) {\n\t to = this.length;\n\t }\n\t for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n\t walker = walker.next;\n\t }\n\t for (; walker !== null && i < to; i++, walker = walker.next) {\n\t ret.push(walker.value);\n\t }\n\t return ret\n\t};\n\n\tYallist.prototype.sliceReverse = function (from, to) {\n\t to = to || this.length;\n\t if (to < 0) {\n\t to += this.length;\n\t }\n\t from = from || 0;\n\t if (from < 0) {\n\t from += this.length;\n\t }\n\t var ret = new Yallist();\n\t if (to < from || to < 0) {\n\t return ret\n\t }\n\t if (from < 0) {\n\t from = 0;\n\t }\n\t if (to > this.length) {\n\t to = this.length;\n\t }\n\t for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n\t walker = walker.prev;\n\t }\n\t for (; walker !== null && i > from; i--, walker = walker.prev) {\n\t ret.push(walker.value);\n\t }\n\t return ret\n\t};\n\n\tYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n\t if (start > this.length) {\n\t start = this.length - 1;\n\t }\n\t if (start < 0) {\n\t start = this.length + start;\n\t }\n\n\t for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n\t walker = walker.next;\n\t }\n\n\t var ret = [];\n\t for (var i = 0; walker && i < deleteCount; i++) {\n\t ret.push(walker.value);\n\t walker = this.removeNode(walker);\n\t }\n\t if (walker === null) {\n\t walker = this.tail;\n\t }\n\n\t if (walker !== this.head && walker !== this.tail) {\n\t walker = walker.prev;\n\t }\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t walker = insert(this, walker, nodes[i]);\n\t }\n\t return ret;\n\t};\n\n\tYallist.prototype.reverse = function () {\n\t var head = this.head;\n\t var tail = this.tail;\n\t for (var walker = head; walker !== null; walker = walker.prev) {\n\t var p = walker.prev;\n\t walker.prev = walker.next;\n\t walker.next = p;\n\t }\n\t this.head = tail;\n\t this.tail = head;\n\t return this\n\t};\n\n\tfunction insert (self, node, value) {\n\t var inserted = node === self.head ?\n\t new Node(value, null, node, self) :\n\t new Node(value, node, node.next, self);\n\n\t if (inserted.next === null) {\n\t self.tail = inserted;\n\t }\n\t if (inserted.prev === null) {\n\t self.head = inserted;\n\t }\n\n\t self.length++;\n\n\t return inserted\n\t}\n\n\tfunction push (self, item) {\n\t self.tail = new Node(item, self.tail, null, self);\n\t if (!self.head) {\n\t self.head = self.tail;\n\t }\n\t self.length++;\n\t}\n\n\tfunction unshift (self, item) {\n\t self.head = new Node(item, null, self.head, self);\n\t if (!self.tail) {\n\t self.tail = self.head;\n\t }\n\t self.length++;\n\t}\n\n\tfunction Node (value, prev, next, list) {\n\t if (!(this instanceof Node)) {\n\t return new Node(value, prev, next, list)\n\t }\n\n\t this.list = list;\n\t this.value = value;\n\n\t if (prev) {\n\t prev.next = this;\n\t this.prev = prev;\n\t } else {\n\t this.prev = null;\n\t }\n\n\t if (next) {\n\t next.prev = this;\n\t this.next = next;\n\t } else {\n\t this.next = null;\n\t }\n\t}\n\n\ttry {\n\t // add if support for Symbol.iterator is present\n\t requireIterator()(Yallist);\n\t} catch (er) {}\n\treturn yallist;\n}\n\nvar lruCache;\nvar hasRequiredLruCache;\n\nfunction requireLruCache () {\n\tif (hasRequiredLruCache) return lruCache;\n\thasRequiredLruCache = 1;\n\n\t// A linked list to keep track of recently-used-ness\n\tconst Yallist = requireYallist();\n\n\tconst MAX = Symbol('max');\n\tconst LENGTH = Symbol('length');\n\tconst LENGTH_CALCULATOR = Symbol('lengthCalculator');\n\tconst ALLOW_STALE = Symbol('allowStale');\n\tconst MAX_AGE = Symbol('maxAge');\n\tconst DISPOSE = Symbol('dispose');\n\tconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');\n\tconst LRU_LIST = Symbol('lruList');\n\tconst CACHE = Symbol('cache');\n\tconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');\n\n\tconst naiveLength = () => 1;\n\n\t// lruList is a yallist where the head is the youngest\n\t// item, and the tail is the oldest. the list contains the Hit\n\t// objects as the entries.\n\t// Each Hit object has a reference to its Yallist.Node. This\n\t// never changes.\n\t//\n\t// cache is a Map (or PseudoMap) that matches the keys to\n\t// the Yallist.Node object.\n\tclass LRUCache {\n\t constructor (options) {\n\t if (typeof options === 'number')\n\t options = { max: options };\n\n\t if (!options)\n\t options = {};\n\n\t if (options.max && (typeof options.max !== 'number' || options.max < 0))\n\t throw new TypeError('max must be a non-negative number')\n\t // Kind of weird to have a default max of Infinity, but oh well.\n\t this[MAX] = options.max || Infinity;\n\n\t const lc = options.length || naiveLength;\n\t this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;\n\t this[ALLOW_STALE] = options.stale || false;\n\t if (options.maxAge && typeof options.maxAge !== 'number')\n\t throw new TypeError('maxAge must be a number')\n\t this[MAX_AGE] = options.maxAge || 0;\n\t this[DISPOSE] = options.dispose;\n\t this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;\n\t this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;\n\t this.reset();\n\t }\n\n\t // resize the cache when the max changes.\n\t set max (mL) {\n\t if (typeof mL !== 'number' || mL < 0)\n\t throw new TypeError('max must be a non-negative number')\n\n\t this[MAX] = mL || Infinity;\n\t trim(this);\n\t }\n\t get max () {\n\t return this[MAX]\n\t }\n\n\t set allowStale (allowStale) {\n\t this[ALLOW_STALE] = !!allowStale;\n\t }\n\t get allowStale () {\n\t return this[ALLOW_STALE]\n\t }\n\n\t set maxAge (mA) {\n\t if (typeof mA !== 'number')\n\t throw new TypeError('maxAge must be a non-negative number')\n\n\t this[MAX_AGE] = mA;\n\t trim(this);\n\t }\n\t get maxAge () {\n\t return this[MAX_AGE]\n\t }\n\n\t // resize the cache when the lengthCalculator changes.\n\t set lengthCalculator (lC) {\n\t if (typeof lC !== 'function')\n\t lC = naiveLength;\n\n\t if (lC !== this[LENGTH_CALCULATOR]) {\n\t this[LENGTH_CALCULATOR] = lC;\n\t this[LENGTH] = 0;\n\t this[LRU_LIST].forEach(hit => {\n\t hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);\n\t this[LENGTH] += hit.length;\n\t });\n\t }\n\t trim(this);\n\t }\n\t get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n\t get length () { return this[LENGTH] }\n\t get itemCount () { return this[LRU_LIST].length }\n\n\t rforEach (fn, thisp) {\n\t thisp = thisp || this;\n\t for (let walker = this[LRU_LIST].tail; walker !== null;) {\n\t const prev = walker.prev;\n\t forEachStep(this, fn, walker, thisp);\n\t walker = prev;\n\t }\n\t }\n\n\t forEach (fn, thisp) {\n\t thisp = thisp || this;\n\t for (let walker = this[LRU_LIST].head; walker !== null;) {\n\t const next = walker.next;\n\t forEachStep(this, fn, walker, thisp);\n\t walker = next;\n\t }\n\t }\n\n\t keys () {\n\t return this[LRU_LIST].toArray().map(k => k.key)\n\t }\n\n\t values () {\n\t return this[LRU_LIST].toArray().map(k => k.value)\n\t }\n\n\t reset () {\n\t if (this[DISPOSE] &&\n\t this[LRU_LIST] &&\n\t this[LRU_LIST].length) {\n\t this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));\n\t }\n\n\t this[CACHE] = new Map(); // hash of items by key\n\t this[LRU_LIST] = new Yallist(); // list of items in order of use recency\n\t this[LENGTH] = 0; // length of items in the list\n\t }\n\n\t dump () {\n\t return this[LRU_LIST].map(hit =>\n\t isStale(this, hit) ? false : {\n\t k: hit.key,\n\t v: hit.value,\n\t e: hit.now + (hit.maxAge || 0)\n\t }).toArray().filter(h => h)\n\t }\n\n\t dumpLru () {\n\t return this[LRU_LIST]\n\t }\n\n\t set (key, value, maxAge) {\n\t maxAge = maxAge || this[MAX_AGE];\n\n\t if (maxAge && typeof maxAge !== 'number')\n\t throw new TypeError('maxAge must be a number')\n\n\t const now = maxAge ? Date.now() : 0;\n\t const len = this[LENGTH_CALCULATOR](value, key);\n\n\t if (this[CACHE].has(key)) {\n\t if (len > this[MAX]) {\n\t del(this, this[CACHE].get(key));\n\t return false\n\t }\n\n\t const node = this[CACHE].get(key);\n\t const item = node.value;\n\n\t // dispose of the old one before overwriting\n\t // split out into 2 ifs for better coverage tracking\n\t if (this[DISPOSE]) {\n\t if (!this[NO_DISPOSE_ON_SET])\n\t this[DISPOSE](key, item.value);\n\t }\n\n\t item.now = now;\n\t item.maxAge = maxAge;\n\t item.value = value;\n\t this[LENGTH] += len - item.length;\n\t item.length = len;\n\t this.get(key);\n\t trim(this);\n\t return true\n\t }\n\n\t const hit = new Entry(key, value, len, now, maxAge);\n\n\t // oversized objects fall out of cache automatically.\n\t if (hit.length > this[MAX]) {\n\t if (this[DISPOSE])\n\t this[DISPOSE](key, value);\n\n\t return false\n\t }\n\n\t this[LENGTH] += hit.length;\n\t this[LRU_LIST].unshift(hit);\n\t this[CACHE].set(key, this[LRU_LIST].head);\n\t trim(this);\n\t return true\n\t }\n\n\t has (key) {\n\t if (!this[CACHE].has(key)) return false\n\t const hit = this[CACHE].get(key).value;\n\t return !isStale(this, hit)\n\t }\n\n\t get (key) {\n\t return get(this, key, true)\n\t }\n\n\t peek (key) {\n\t return get(this, key, false)\n\t }\n\n\t pop () {\n\t const node = this[LRU_LIST].tail;\n\t if (!node)\n\t return null\n\n\t del(this, node);\n\t return node.value\n\t }\n\n\t del (key) {\n\t del(this, this[CACHE].get(key));\n\t }\n\n\t load (arr) {\n\t // reset the cache\n\t this.reset();\n\n\t const now = Date.now();\n\t // A previous serialized cache has the most recent items first\n\t for (let l = arr.length - 1; l >= 0; l--) {\n\t const hit = arr[l];\n\t const expiresAt = hit.e || 0;\n\t if (expiresAt === 0)\n\t // the item was created without expiration in a non aged cache\n\t this.set(hit.k, hit.v);\n\t else {\n\t const maxAge = expiresAt - now;\n\t // dont add already expired items\n\t if (maxAge > 0) {\n\t this.set(hit.k, hit.v, maxAge);\n\t }\n\t }\n\t }\n\t }\n\n\t prune () {\n\t this[CACHE].forEach((value, key) => get(this, key, false));\n\t }\n\t}\n\n\tconst get = (self, key, doUse) => {\n\t const node = self[CACHE].get(key);\n\t if (node) {\n\t const hit = node.value;\n\t if (isStale(self, hit)) {\n\t del(self, node);\n\t if (!self[ALLOW_STALE])\n\t return undefined\n\t } else {\n\t if (doUse) {\n\t if (self[UPDATE_AGE_ON_GET])\n\t node.value.now = Date.now();\n\t self[LRU_LIST].unshiftNode(node);\n\t }\n\t }\n\t return hit.value\n\t }\n\t};\n\n\tconst isStale = (self, hit) => {\n\t if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n\t return false\n\n\t const diff = Date.now() - hit.now;\n\t return hit.maxAge ? diff > hit.maxAge\n\t : self[MAX_AGE] && (diff > self[MAX_AGE])\n\t};\n\n\tconst trim = self => {\n\t if (self[LENGTH] > self[MAX]) {\n\t for (let walker = self[LRU_LIST].tail;\n\t self[LENGTH] > self[MAX] && walker !== null;) {\n\t // We know that we're about to delete this one, and also\n\t // what the next least recently used key will be, so just\n\t // go ahead and set it now.\n\t const prev = walker.prev;\n\t del(self, walker);\n\t walker = prev;\n\t }\n\t }\n\t};\n\n\tconst del = (self, node) => {\n\t if (node) {\n\t const hit = node.value;\n\t if (self[DISPOSE])\n\t self[DISPOSE](hit.key, hit.value);\n\n\t self[LENGTH] -= hit.length;\n\t self[CACHE].delete(hit.key);\n\t self[LRU_LIST].removeNode(node);\n\t }\n\t};\n\n\tclass Entry {\n\t constructor (key, value, length, now, maxAge) {\n\t this.key = key;\n\t this.value = value;\n\t this.length = length;\n\t this.now = now;\n\t this.maxAge = maxAge || 0;\n\t }\n\t}\n\n\tconst forEachStep = (self, fn, node, thisp) => {\n\t let hit = node.value;\n\t if (isStale(self, hit)) {\n\t del(self, node);\n\t if (!self[ALLOW_STALE])\n\t hit = undefined;\n\t }\n\t if (hit)\n\t fn.call(thisp, hit.value, hit.key, self);\n\t};\n\n\tlruCache = LRUCache;\n\treturn lruCache;\n}\n\nvar range;\nvar hasRequiredRange;\n\nfunction requireRange () {\n\tif (hasRequiredRange) return range;\n\thasRequiredRange = 1;\n\t// hoisted class for cyclic dependency\n\tclass Range {\n\t constructor (range, options) {\n\t options = parseOptions(options);\n\n\t if (range instanceof Range) {\n\t if (\n\t range.loose === !!options.loose &&\n\t range.includePrerelease === !!options.includePrerelease\n\t ) {\n\t return range\n\t } else {\n\t return new Range(range.raw, options)\n\t }\n\t }\n\n\t if (range instanceof Comparator) {\n\t // just put it in the set and return\n\t this.raw = range.value;\n\t this.set = [[range]];\n\t this.format();\n\t return this\n\t }\n\n\t this.options = options;\n\t this.loose = !!options.loose;\n\t this.includePrerelease = !!options.includePrerelease;\n\n\t // First, split based on boolean or ||\n\t this.raw = range;\n\t this.set = range\n\t .split('||')\n\t // map the range to a 2d array of comparators\n\t .map(r => this.parseRange(r.trim()))\n\t // throw out any comparator lists that are empty\n\t // this generally means that it was not a valid range, which is allowed\n\t // in loose mode, but will still throw if the WHOLE range is invalid.\n\t .filter(c => c.length);\n\n\t if (!this.set.length) {\n\t throw new TypeError(`Invalid SemVer Range: ${range}`)\n\t }\n\n\t // if we have any that are not the null set, throw out null sets.\n\t if (this.set.length > 1) {\n\t // keep the first one, in case they're all null sets\n\t const first = this.set[0];\n\t this.set = this.set.filter(c => !isNullSet(c[0]));\n\t if (this.set.length === 0) {\n\t this.set = [first];\n\t } else if (this.set.length > 1) {\n\t // if we have any that are *, then the range is just *\n\t for (const c of this.set) {\n\t if (c.length === 1 && isAny(c[0])) {\n\t this.set = [c];\n\t break\n\t }\n\t }\n\t }\n\t }\n\n\t this.format();\n\t }\n\n\t format () {\n\t this.range = this.set\n\t .map((comps) => {\n\t return comps.join(' ').trim()\n\t })\n\t .join('||')\n\t .trim();\n\t return this.range\n\t }\n\n\t toString () {\n\t return this.range\n\t }\n\n\t parseRange (range) {\n\t range = range.trim();\n\n\t // memoize range parsing for performance.\n\t // this is a very hot path, and fully deterministic.\n\t const memoOpts = Object.keys(this.options).join(',');\n\t const memoKey = `parseRange:${memoOpts}:${range}`;\n\t const cached = cache.get(memoKey);\n\t if (cached) {\n\t return cached\n\t }\n\n\t const loose = this.options.loose;\n\t // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n\t const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];\n\t range = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n\t debug('hyphen replace', range);\n\t // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n\t range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);\n\t debug('comparator trim', range);\n\n\t // `~ 1.2.3` => `~1.2.3`\n\t range = range.replace(re[t.TILDETRIM], tildeTrimReplace);\n\n\t // `^ 1.2.3` => `^1.2.3`\n\t range = range.replace(re[t.CARETTRIM], caretTrimReplace);\n\n\t // normalize spaces\n\t range = range.split(/\\s+/).join(' ');\n\n\t // At this point, the range is completely trimmed and\n\t // ready to be split into comparators.\n\n\t let rangeList = range\n\t .split(' ')\n\t .map(comp => parseComparator(comp, this.options))\n\t .join(' ')\n\t .split(/\\s+/)\n\t // >=0.0.0 is equivalent to *\n\t .map(comp => replaceGTE0(comp, this.options));\n\n\t if (loose) {\n\t // in loose mode, throw out any that are not valid comparators\n\t rangeList = rangeList.filter(comp => {\n\t debug('loose invalid filter', comp, this.options);\n\t return !!comp.match(re[t.COMPARATORLOOSE])\n\t });\n\t }\n\t debug('range list', rangeList);\n\n\t // if any comparators are the null set, then replace with JUST null set\n\t // if more than one comparator, remove any * comparators\n\t // also, don't include the same comparator more than once\n\t const rangeMap = new Map();\n\t const comparators = rangeList.map(comp => new Comparator(comp, this.options));\n\t for (const comp of comparators) {\n\t if (isNullSet(comp)) {\n\t return [comp]\n\t }\n\t rangeMap.set(comp.value, comp);\n\t }\n\t if (rangeMap.size > 1 && rangeMap.has('')) {\n\t rangeMap.delete('');\n\t }\n\n\t const result = [...rangeMap.values()];\n\t cache.set(memoKey, result);\n\t return result\n\t }\n\n\t intersects (range, options) {\n\t if (!(range instanceof Range)) {\n\t throw new TypeError('a Range is required')\n\t }\n\n\t return this.set.some((thisComparators) => {\n\t return (\n\t isSatisfiable(thisComparators, options) &&\n\t range.set.some((rangeComparators) => {\n\t return (\n\t isSatisfiable(rangeComparators, options) &&\n\t thisComparators.every((thisComparator) => {\n\t return rangeComparators.every((rangeComparator) => {\n\t return thisComparator.intersects(rangeComparator, options)\n\t })\n\t })\n\t )\n\t })\n\t )\n\t })\n\t }\n\n\t // if ANY of the sets match ALL of its comparators, then pass\n\t test (version) {\n\t if (!version) {\n\t return false\n\t }\n\n\t if (typeof version === 'string') {\n\t try {\n\t version = new SemVer(version, this.options);\n\t } catch (er) {\n\t return false\n\t }\n\t }\n\n\t for (let i = 0; i < this.set.length; i++) {\n\t if (testSet(this.set[i], version, this.options)) {\n\t return true\n\t }\n\t }\n\t return false\n\t }\n\t}\n\trange = Range;\n\n\tconst LRU = requireLruCache();\n\tconst cache = new LRU({ max: 1000 });\n\n\tconst parseOptions = parseOptions_1;\n\tconst Comparator = requireComparator();\n\tconst debug = debug_1;\n\tconst SemVer = semver$2;\n\tconst {\n\t re,\n\t t,\n\t comparatorTrimReplace,\n\t tildeTrimReplace,\n\t caretTrimReplace,\n\t} = re$3.exports;\n\n\tconst isNullSet = c => c.value === '<0.0.0-0';\n\tconst isAny = c => c.value === '';\n\n\t// take a set of comparators and determine whether there\n\t// exists a version which can satisfy it\n\tconst isSatisfiable = (comparators, options) => {\n\t let result = true;\n\t const remainingComparators = comparators.slice();\n\t let testComparator = remainingComparators.pop();\n\n\t while (result && remainingComparators.length) {\n\t result = remainingComparators.every((otherComparator) => {\n\t return testComparator.intersects(otherComparator, options)\n\t });\n\n\t testComparator = remainingComparators.pop();\n\t }\n\n\t return result\n\t};\n\n\t// comprised of xranges, tildes, stars, and gtlt's at this point.\n\t// already replaced the hyphen ranges\n\t// turn into a set of JUST comparators.\n\tconst parseComparator = (comp, options) => {\n\t debug('comp', comp, options);\n\t comp = replaceCarets(comp, options);\n\t debug('caret', comp);\n\t comp = replaceTildes(comp, options);\n\t debug('tildes', comp);\n\t comp = replaceXRanges(comp, options);\n\t debug('xrange', comp);\n\t comp = replaceStars(comp, options);\n\t debug('stars', comp);\n\t return comp\n\t};\n\n\tconst isX = id => !id || id.toLowerCase() === 'x' || id === '*';\n\n\t// ~, ~> --> * (any, kinda silly)\n\t// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n\t// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n\t// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n\t// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n\t// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n\tconst replaceTildes = (comp, options) =>\n\t comp.trim().split(/\\s+/).map((c) => {\n\t return replaceTilde(c, options)\n\t }).join(' ');\n\n\tconst replaceTilde = (comp, options) => {\n\t const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];\n\t return comp.replace(r, (_, M, m, p, pr) => {\n\t debug('tilde', comp, _, M, m, p, pr);\n\t let ret;\n\n\t if (isX(M)) {\n\t ret = '';\n\t } else if (isX(m)) {\n\t ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;\n\t } else if (isX(p)) {\n\t // ~1.2 == >=1.2.0 <1.3.0-0\n\t ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;\n\t } else if (pr) {\n\t debug('replaceTilde pr', pr);\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${M}.${+m + 1}.0-0`;\n\t } else {\n\t // ~1.2.3 == >=1.2.3 <1.3.0-0\n\t ret = `>=${M}.${m}.${p\n\t } <${M}.${+m + 1}.0-0`;\n\t }\n\n\t debug('tilde return', ret);\n\t return ret\n\t })\n\t};\n\n\t// ^ --> * (any, kinda silly)\n\t// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n\t// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n\t// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n\t// ^1.2.3 --> >=1.2.3 <2.0.0-0\n\t// ^1.2.0 --> >=1.2.0 <2.0.0-0\n\tconst replaceCarets = (comp, options) =>\n\t comp.trim().split(/\\s+/).map((c) => {\n\t return replaceCaret(c, options)\n\t }).join(' ');\n\n\tconst replaceCaret = (comp, options) => {\n\t debug('caret', comp, options);\n\t const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];\n\t const z = options.includePrerelease ? '-0' : '';\n\t return comp.replace(r, (_, M, m, p, pr) => {\n\t debug('caret', comp, _, M, m, p, pr);\n\t let ret;\n\n\t if (isX(M)) {\n\t ret = '';\n\t } else if (isX(m)) {\n\t ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;\n\t } else if (isX(p)) {\n\t if (M === '0') {\n\t ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;\n\t } else {\n\t ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;\n\t }\n\t } else if (pr) {\n\t debug('replaceCaret pr', pr);\n\t if (M === '0') {\n\t if (m === '0') {\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${M}.${m}.${+p + 1}-0`;\n\t } else {\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${M}.${+m + 1}.0-0`;\n\t }\n\t } else {\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${+M + 1}.0.0-0`;\n\t }\n\t } else {\n\t debug('no pr');\n\t if (M === '0') {\n\t if (m === '0') {\n\t ret = `>=${M}.${m}.${p\n\t }${z} <${M}.${m}.${+p + 1}-0`;\n\t } else {\n\t ret = `>=${M}.${m}.${p\n\t }${z} <${M}.${+m + 1}.0-0`;\n\t }\n\t } else {\n\t ret = `>=${M}.${m}.${p\n\t } <${+M + 1}.0.0-0`;\n\t }\n\t }\n\n\t debug('caret return', ret);\n\t return ret\n\t })\n\t};\n\n\tconst replaceXRanges = (comp, options) => {\n\t debug('replaceXRanges', comp, options);\n\t return comp.split(/\\s+/).map((c) => {\n\t return replaceXRange(c, options)\n\t }).join(' ')\n\t};\n\n\tconst replaceXRange = (comp, options) => {\n\t comp = comp.trim();\n\t const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];\n\t return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n\t debug('xRange', comp, ret, gtlt, M, m, p, pr);\n\t const xM = isX(M);\n\t const xm = xM || isX(m);\n\t const xp = xm || isX(p);\n\t const anyX = xp;\n\n\t if (gtlt === '=' && anyX) {\n\t gtlt = '';\n\t }\n\n\t // if we're including prereleases in the match, then we need\n\t // to fix this to -0, the lowest possible prerelease value\n\t pr = options.includePrerelease ? '-0' : '';\n\n\t if (xM) {\n\t if (gtlt === '>' || gtlt === '<') {\n\t // nothing is allowed\n\t ret = '<0.0.0-0';\n\t } else {\n\t // nothing is forbidden\n\t ret = '*';\n\t }\n\t } else if (gtlt && anyX) {\n\t // we know patch is an x, because we have any x at all.\n\t // replace X with 0\n\t if (xm) {\n\t m = 0;\n\t }\n\t p = 0;\n\n\t if (gtlt === '>') {\n\t // >1 => >=2.0.0\n\t // >1.2 => >=1.3.0\n\t gtlt = '>=';\n\t if (xm) {\n\t M = +M + 1;\n\t m = 0;\n\t p = 0;\n\t } else {\n\t m = +m + 1;\n\t p = 0;\n\t }\n\t } else if (gtlt === '<=') {\n\t // <=0.7.x is actually <0.8.0, since any 0.7.x should\n\t // pass. Similarly, <=7.x is actually <8.0.0, etc.\n\t gtlt = '<';\n\t if (xm) {\n\t M = +M + 1;\n\t } else {\n\t m = +m + 1;\n\t }\n\t }\n\n\t if (gtlt === '<') {\n\t pr = '-0';\n\t }\n\n\t ret = `${gtlt + M}.${m}.${p}${pr}`;\n\t } else if (xm) {\n\t ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;\n\t } else if (xp) {\n\t ret = `>=${M}.${m}.0${pr\n\t } <${M}.${+m + 1}.0-0`;\n\t }\n\n\t debug('xRange return', ret);\n\n\t return ret\n\t })\n\t};\n\n\t// Because * is AND-ed with everything else in the comparator,\n\t// and '' means \"any version\", just remove the *s entirely.\n\tconst replaceStars = (comp, options) => {\n\t debug('replaceStars', comp, options);\n\t // Looseness is ignored here. star is always as loose as it gets!\n\t return comp.trim().replace(re[t.STAR], '')\n\t};\n\n\tconst replaceGTE0 = (comp, options) => {\n\t debug('replaceGTE0', comp, options);\n\t return comp.trim()\n\t .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n\t};\n\n\t// This function is passed to string.replace(re[t.HYPHENRANGE])\n\t// M, m, patch, prerelease, build\n\t// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n\t// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n\t// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n\tconst hyphenReplace = incPr => ($0,\n\t from, fM, fm, fp, fpr, fb,\n\t to, tM, tm, tp, tpr, tb) => {\n\t if (isX(fM)) {\n\t from = '';\n\t } else if (isX(fm)) {\n\t from = `>=${fM}.0.0${incPr ? '-0' : ''}`;\n\t } else if (isX(fp)) {\n\t from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`;\n\t } else if (fpr) {\n\t from = `>=${from}`;\n\t } else {\n\t from = `>=${from}${incPr ? '-0' : ''}`;\n\t }\n\n\t if (isX(tM)) {\n\t to = '';\n\t } else if (isX(tm)) {\n\t to = `<${+tM + 1}.0.0-0`;\n\t } else if (isX(tp)) {\n\t to = `<${tM}.${+tm + 1}.0-0`;\n\t } else if (tpr) {\n\t to = `<=${tM}.${tm}.${tp}-${tpr}`;\n\t } else if (incPr) {\n\t to = `<${tM}.${tm}.${+tp + 1}-0`;\n\t } else {\n\t to = `<=${to}`;\n\t }\n\n\t return (`${from} ${to}`).trim()\n\t};\n\n\tconst testSet = (set, version, options) => {\n\t for (let i = 0; i < set.length; i++) {\n\t if (!set[i].test(version)) {\n\t return false\n\t }\n\t }\n\n\t if (version.prerelease.length && !options.includePrerelease) {\n\t // Find the set of versions that are allowed to have prereleases\n\t // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n\t // That should allow `1.2.3-pr.2` to pass.\n\t // However, `1.2.4-alpha.notready` should NOT be allowed,\n\t // even though it's within the range set by the comparators.\n\t for (let i = 0; i < set.length; i++) {\n\t debug(set[i].semver);\n\t if (set[i].semver === Comparator.ANY) {\n\t continue\n\t }\n\n\t if (set[i].semver.prerelease.length > 0) {\n\t const allowed = set[i].semver;\n\t if (allowed.major === version.major &&\n\t allowed.minor === version.minor &&\n\t allowed.patch === version.patch) {\n\t return true\n\t }\n\t }\n\t }\n\n\t // Version has a -pre, but it's not one of the ones we like.\n\t return false\n\t }\n\n\t return true\n\t};\n\treturn range;\n}\n\nvar comparator;\nvar hasRequiredComparator;\n\nfunction requireComparator () {\n\tif (hasRequiredComparator) return comparator;\n\thasRequiredComparator = 1;\n\tconst ANY = Symbol('SemVer ANY');\n\t// hoisted class for cyclic dependency\n\tclass Comparator {\n\t static get ANY () {\n\t return ANY\n\t }\n\n\t constructor (comp, options) {\n\t options = parseOptions(options);\n\n\t if (comp instanceof Comparator) {\n\t if (comp.loose === !!options.loose) {\n\t return comp\n\t } else {\n\t comp = comp.value;\n\t }\n\t }\n\n\t debug('comparator', comp, options);\n\t this.options = options;\n\t this.loose = !!options.loose;\n\t this.parse(comp);\n\n\t if (this.semver === ANY) {\n\t this.value = '';\n\t } else {\n\t this.value = this.operator + this.semver.version;\n\t }\n\n\t debug('comp', this);\n\t }\n\n\t parse (comp) {\n\t const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];\n\t const m = comp.match(r);\n\n\t if (!m) {\n\t throw new TypeError(`Invalid comparator: ${comp}`)\n\t }\n\n\t this.operator = m[1] !== undefined ? m[1] : '';\n\t if (this.operator === '=') {\n\t this.operator = '';\n\t }\n\n\t // if it literally is just '>' or '' then allow anything.\n\t if (!m[2]) {\n\t this.semver = ANY;\n\t } else {\n\t this.semver = new SemVer(m[2], this.options.loose);\n\t }\n\t }\n\n\t toString () {\n\t return this.value\n\t }\n\n\t test (version) {\n\t debug('Comparator.test', version, this.options.loose);\n\n\t if (this.semver === ANY || version === ANY) {\n\t return true\n\t }\n\n\t if (typeof version === 'string') {\n\t try {\n\t version = new SemVer(version, this.options);\n\t } catch (er) {\n\t return false\n\t }\n\t }\n\n\t return cmp(version, this.operator, this.semver, this.options)\n\t }\n\n\t intersects (comp, options) {\n\t if (!(comp instanceof Comparator)) {\n\t throw new TypeError('a Comparator is required')\n\t }\n\n\t if (!options || typeof options !== 'object') {\n\t options = {\n\t loose: !!options,\n\t includePrerelease: false,\n\t };\n\t }\n\n\t if (this.operator === '') {\n\t if (this.value === '') {\n\t return true\n\t }\n\t return new Range(comp.value, options).test(this.value)\n\t } else if (comp.operator === '') {\n\t if (comp.value === '') {\n\t return true\n\t }\n\t return new Range(this.value, options).test(comp.semver)\n\t }\n\n\t const sameDirectionIncreasing =\n\t (this.operator === '>=' || this.operator === '>') &&\n\t (comp.operator === '>=' || comp.operator === '>');\n\t const sameDirectionDecreasing =\n\t (this.operator === '<=' || this.operator === '<') &&\n\t (comp.operator === '<=' || comp.operator === '<');\n\t const sameSemVer = this.semver.version === comp.semver.version;\n\t const differentDirectionsInclusive =\n\t (this.operator === '>=' || this.operator === '<=') &&\n\t (comp.operator === '>=' || comp.operator === '<=');\n\t const oppositeDirectionsLessThan =\n\t cmp(this.semver, '<', comp.semver, options) &&\n\t (this.operator === '>=' || this.operator === '>') &&\n\t (comp.operator === '<=' || comp.operator === '<');\n\t const oppositeDirectionsGreaterThan =\n\t cmp(this.semver, '>', comp.semver, options) &&\n\t (this.operator === '<=' || this.operator === '<') &&\n\t (comp.operator === '>=' || comp.operator === '>');\n\n\t return (\n\t sameDirectionIncreasing ||\n\t sameDirectionDecreasing ||\n\t (sameSemVer && differentDirectionsInclusive) ||\n\t oppositeDirectionsLessThan ||\n\t oppositeDirectionsGreaterThan\n\t )\n\t }\n\t}\n\n\tcomparator = Comparator;\n\n\tconst parseOptions = parseOptions_1;\n\tconst { re, t } = re$3.exports;\n\tconst cmp = cmp_1;\n\tconst debug = debug_1;\n\tconst SemVer = semver$2;\n\tconst Range = requireRange();\n\treturn comparator;\n}\n\nconst Range$8 = requireRange();\nconst satisfies$3 = (version, range, options) => {\n try {\n range = new Range$8(range, options);\n } catch (er) {\n return false\n }\n return range.test(version)\n};\nvar satisfies_1 = satisfies$3;\n\nconst Range$7 = requireRange();\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range$7(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '));\n\nvar toComparators_1 = toComparators;\n\nconst SemVer$3 = semver$2;\nconst Range$6 = requireRange();\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null;\n let maxSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range$6(range, options);\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v;\n maxSV = new SemVer$3(max, options);\n }\n }\n });\n return max\n};\nvar maxSatisfying_1 = maxSatisfying;\n\nconst SemVer$2 = semver$2;\nconst Range$5 = requireRange();\nconst minSatisfying = (versions, range, options) => {\n let min = null;\n let minSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range$5(range, options);\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v;\n minSV = new SemVer$2(min, options);\n }\n }\n });\n return min\n};\nvar minSatisfying_1 = minSatisfying;\n\nconst SemVer$1 = semver$2;\nconst Range$4 = requireRange();\nconst gt$1 = gt_1;\n\nconst minVersion = (range, loose) => {\n range = new Range$4(range, loose);\n\n let minver = new SemVer$1('0.0.0');\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer$1('0.0.0-0');\n if (range.test(minver)) {\n return minver\n }\n\n minver = null;\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i];\n\n let setMin = null;\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer$1(comparator.semver.version);\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++;\n } else {\n compver.prerelease.push(0);\n }\n compver.raw = compver.format();\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt$1(compver, setMin)) {\n setMin = compver;\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n });\n if (setMin && (!minver || gt$1(minver, setMin))) {\n minver = setMin;\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n};\nvar minVersion_1 = minVersion;\n\nconst Range$3 = requireRange();\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range$3(range, options).range || '*'\n } catch (er) {\n return null\n }\n};\nvar valid = validRange;\n\nconst SemVer = semver$2;\nconst Comparator$1 = requireComparator();\nconst { ANY: ANY$1 } = Comparator$1;\nconst Range$2 = requireRange();\nconst satisfies$2 = satisfies_1;\nconst gt = gt_1;\nconst lt = lt_1;\nconst lte = lte_1;\nconst gte = gte_1;\n\nconst outside$2 = (version, range, hilo, options) => {\n version = new SemVer(version, options);\n range = new Range$2(range, options);\n\n let gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case '>':\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = '>';\n ecomp = '>=';\n break\n case '<':\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = '<';\n ecomp = '<=';\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies$2(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i];\n\n let high = null;\n let low = null;\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY$1) {\n comparator = new Comparator$1('>=0.0.0');\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator;\n }\n });\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n};\n\nvar outside_1 = outside$2;\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside$1 = outside_1;\nconst gtr = (version, range, options) => outside$1(version, range, '>', options);\nvar gtr_1 = gtr;\n\nconst outside = outside_1;\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options);\nvar ltr_1 = ltr;\n\nconst Range$1 = requireRange();\nconst intersects = (r1, r2, options) => {\n r1 = new Range$1(r1, options);\n r2 = new Range$1(r2, options);\n return r1.intersects(r2)\n};\nvar intersects_1 = intersects;\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies$1 = satisfies_1;\nconst compare$1 = compare_1;\nvar simplify = (versions, range, options) => {\n const set = [];\n let first = null;\n let prev = null;\n const v = versions.sort((a, b) => compare$1(a, b, options));\n for (const version of v) {\n const included = satisfies$1(version, range, options);\n if (included) {\n prev = version;\n if (!first) {\n first = version;\n }\n } else {\n if (prev) {\n set.push([first, prev]);\n }\n prev = null;\n first = null;\n }\n }\n if (first) {\n set.push([first, null]);\n }\n\n const ranges = [];\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min);\n } else if (!max && min === v[0]) {\n ranges.push('*');\n } else if (!max) {\n ranges.push(`>=${min}`);\n } else if (min === v[0]) {\n ranges.push(`<=${max}`);\n } else {\n ranges.push(`${min} - ${max}`);\n }\n }\n const simplified = ranges.join(' || ');\n const original = typeof range.raw === 'string' ? range.raw : String(range);\n return simplified.length < original.length ? simplified : range\n};\n\nconst Range = requireRange();\nconst Comparator = requireComparator();\nconst { ANY } = Comparator;\nconst satisfies = satisfies_1;\nconst compare = compare_1;\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options);\n dom = new Range(dom, options);\n let sawNonNull = false;\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options);\n sawNonNull = sawNonNull || isSub !== null;\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n};\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = [new Comparator('>=0.0.0-0')];\n } else {\n sub = [new Comparator('>=0.0.0')];\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = [new Comparator('>=0.0.0')];\n }\n }\n\n const eqSet = new Set();\n let gt, lt;\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options);\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options);\n } else {\n eqSet.add(c.semver);\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp;\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options);\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower;\n let hasDomLT, hasDomGT;\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false;\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false;\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false;\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=';\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=';\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false;\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options);\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false;\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options);\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n};\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options);\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n};\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options);\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n};\n\nvar subset_1 = subset;\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = re$3.exports;\nvar semver$1 = {\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n SemVer: semver$2,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n parse: parse_1,\n valid: valid_1,\n clean: clean_1,\n inc: inc_1,\n diff: diff_1,\n major: major_1,\n minor: minor_1,\n patch: patch_1,\n prerelease: prerelease_1,\n compare: compare_1,\n rcompare: rcompare_1,\n compareLoose: compareLoose_1,\n compareBuild: compareBuild_1,\n sort: sort_1,\n rsort: rsort_1,\n gt: gt_1,\n lt: lt_1,\n eq: eq_1,\n neq: neq_1,\n gte: gte_1,\n lte: lte_1,\n cmp: cmp_1,\n coerce: coerce_1,\n Comparator: requireComparator(),\n Range: requireRange(),\n satisfies: satisfies_1,\n toComparators: toComparators_1,\n maxSatisfying: maxSatisfying_1,\n minSatisfying: minSatisfying_1,\n minVersion: minVersion_1,\n validRange: valid,\n outside: outside_1,\n gtr: gtr_1,\n ltr: ltr_1,\n intersects: intersects_1,\n simplifyRange: simplify,\n subset: subset_1,\n};\n\nvar semver = semver$1;\n\nvar builtins = function ({\n version = process.version,\n experimental = false\n} = {}) {\n var coreModules = [\n 'assert',\n 'buffer',\n 'child_process',\n 'cluster',\n 'console',\n 'constants',\n 'crypto',\n 'dgram',\n 'dns',\n 'domain',\n 'events',\n 'fs',\n 'http',\n 'https',\n 'module',\n 'net',\n 'os',\n 'path',\n 'punycode',\n 'querystring',\n 'readline',\n 'repl',\n 'stream',\n 'string_decoder',\n 'sys',\n 'timers',\n 'tls',\n 'tty',\n 'url',\n 'util',\n 'vm',\n 'zlib'\n ];\n\n if (semver.lt(version, '6.0.0')) coreModules.push('freelist');\n if (semver.gte(version, '1.0.0')) coreModules.push('v8');\n if (semver.gte(version, '1.1.0')) coreModules.push('process');\n if (semver.gte(version, '8.0.0')) coreModules.push('inspector');\n if (semver.gte(version, '8.1.0')) coreModules.push('async_hooks');\n if (semver.gte(version, '8.4.0')) coreModules.push('http2');\n if (semver.gte(version, '8.5.0')) coreModules.push('perf_hooks');\n if (semver.gte(version, '10.0.0')) coreModules.push('trace_events');\n\n if (\n semver.gte(version, '10.5.0') &&\n (experimental || semver.gte(version, '12.0.0'))\n ) {\n coreModules.push('worker_threads');\n }\n if (semver.gte(version, '12.16.0') && experimental) {\n coreModules.push('wasi');\n }\n \n return coreModules\n};\n\n// Manually “tree shaken” from:\n\nconst reader = {read};\n\n/**\n * @param {string} jsonPath\n * @returns {{string: string}}\n */\nfunction read(jsonPath) {\n return find(path.dirname(jsonPath))\n}\n\n/**\n * @param {string} dir\n * @returns {{string: string}}\n */\nfunction find(dir) {\n try {\n const string = fs.readFileSync(\n path.toNamespacedPath(path.join(dir, 'package.json')),\n 'utf8'\n );\n return {string}\n } catch (error) {\n if (error.code === 'ENOENT') {\n const parent = path.dirname(dir);\n if (dir !== parent) return find(parent)\n return {string: undefined}\n // Throw all other errors.\n /* c8 ignore next 4 */\n }\n\n throw error\n }\n}\n\n// Manually “tree shaken” from:\n\nconst isWindows = process.platform === 'win32';\n\nconst own$1 = {}.hasOwnProperty;\n\nconst codes = {};\n\n/**\n * @typedef {(...args: unknown[]) => string} MessageFunction\n */\n\n/** @type {Map} */\nconst messages = new Map();\nconst nodeInternalPrefix = '__node_internal_';\n/** @type {number} */\nlet userStackTraceLimit;\n\ncodes.ERR_INVALID_MODULE_SPECIFIER = createError(\n 'ERR_INVALID_MODULE_SPECIFIER',\n /**\n * @param {string} request\n * @param {string} reason\n * @param {string} [base]\n */\n (request, reason, base = undefined) => {\n return `Invalid module \"${request}\" ${reason}${\n base ? ` imported from ${base}` : ''\n }`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_PACKAGE_CONFIG = createError(\n 'ERR_INVALID_PACKAGE_CONFIG',\n /**\n * @param {string} path\n * @param {string} [base]\n * @param {string} [message]\n */\n (path, base, message) => {\n return `Invalid package config ${path}${\n base ? ` while importing ${base}` : ''\n }${message ? `. ${message}` : ''}`\n },\n Error\n);\n\ncodes.ERR_INVALID_PACKAGE_TARGET = createError(\n 'ERR_INVALID_PACKAGE_TARGET',\n /**\n * @param {string} pkgPath\n * @param {string} key\n * @param {unknown} target\n * @param {boolean} [isImport=false]\n * @param {string} [base]\n */\n (pkgPath, key, target, isImport = false, base = undefined) => {\n const relError =\n typeof target === 'string' &&\n !isImport &&\n target.length > 0 &&\n !target.startsWith('./');\n if (key === '.') {\n assert(isImport === false);\n return (\n `Invalid \"exports\" main target ${JSON.stringify(target)} defined ` +\n `in the package config ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }${relError ? '; targets must start with \"./\"' : ''}`\n )\n }\n\n return `Invalid \"${\n isImport ? 'imports' : 'exports'\n }\" target ${JSON.stringify(\n target\n )} defined for '${key}' in the package config ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }${relError ? '; targets must start with \"./\"' : ''}`\n },\n Error\n);\n\ncodes.ERR_MODULE_NOT_FOUND = createError(\n 'ERR_MODULE_NOT_FOUND',\n /**\n * @param {string} path\n * @param {string} base\n * @param {string} [type]\n */\n (path, base, type = 'package') => {\n return `Cannot find ${type} '${path}' imported from ${base}`\n },\n Error\n);\n\ncodes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\n 'ERR_PACKAGE_IMPORT_NOT_DEFINED',\n /**\n * @param {string} specifier\n * @param {string} packagePath\n * @param {string} base\n */\n (specifier, packagePath, base) => {\n return `Package import specifier \"${specifier}\" is not defined${\n packagePath ? ` in package ${packagePath}package.json` : ''\n } imported from ${base}`\n },\n TypeError\n);\n\ncodes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\n 'ERR_PACKAGE_PATH_NOT_EXPORTED',\n /**\n * @param {string} pkgPath\n * @param {string} subpath\n * @param {string} [base]\n */\n (pkgPath, subpath, base = undefined) => {\n if (subpath === '.')\n return `No \"exports\" main defined in ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n return `Package subpath '${subpath}' is not defined by \"exports\" in ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n },\n Error\n);\n\ncodes.ERR_UNSUPPORTED_DIR_IMPORT = createError(\n 'ERR_UNSUPPORTED_DIR_IMPORT',\n \"Directory import '%s' is not supported \" +\n 'resolving ES modules imported from %s',\n Error\n);\n\ncodes.ERR_UNKNOWN_FILE_EXTENSION = createError(\n 'ERR_UNKNOWN_FILE_EXTENSION',\n 'Unknown file extension \"%s\" for %s',\n TypeError\n);\n\ncodes.ERR_INVALID_ARG_VALUE = createError(\n 'ERR_INVALID_ARG_VALUE',\n /**\n * @param {string} name\n * @param {unknown} value\n * @param {string} [reason='is invalid']\n */\n (name, value, reason = 'is invalid') => {\n let inspected = inspect(value);\n\n if (inspected.length > 128) {\n inspected = `${inspected.slice(0, 128)}...`;\n }\n\n const type = name.includes('.') ? 'property' : 'argument';\n\n return `The ${type} '${name}' ${reason}. Received ${inspected}`\n },\n TypeError\n // Note: extra classes have been shaken out.\n // , RangeError\n);\n\ncodes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(\n 'ERR_UNSUPPORTED_ESM_URL_SCHEME',\n /**\n * @param {URL} url\n */\n (url) => {\n let message =\n 'Only file and data URLs are supported by the default ESM loader';\n\n if (isWindows && url.protocol.length === 2) {\n message += '. On Windows, absolute paths must be valid file:// URLs';\n }\n\n message += `. Received protocol '${url.protocol}'`;\n return message\n },\n Error\n);\n\n/**\n * Utility function for registering the error codes. Only used here. Exported\n * *only* to allow for testing.\n * @param {string} sym\n * @param {MessageFunction|string} value\n * @param {ErrorConstructor} def\n * @returns {new (...args: unknown[]) => Error}\n */\nfunction createError(sym, value, def) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, value);\n\n return makeNodeErrorWithCode(def, sym)\n}\n\n/**\n * @param {ErrorConstructor} Base\n * @param {string} key\n * @returns {ErrorConstructor}\n */\nfunction makeNodeErrorWithCode(Base, key) {\n // @ts-expect-error It’s a Node error.\n return NodeError\n /**\n * @param {unknown[]} args\n */\n function NodeError(...args) {\n const limit = Error.stackTraceLimit;\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;\n const error = new Base();\n // Reset the limit and setting the name property.\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;\n const message = getMessage(key, args, error);\n Object.defineProperty(error, 'message', {\n value: message,\n enumerable: false,\n writable: true,\n configurable: true\n });\n Object.defineProperty(error, 'toString', {\n /** @this {Error} */\n value() {\n return `${this.name} [${key}]: ${this.message}`\n },\n enumerable: false,\n writable: true,\n configurable: true\n });\n addCodeToName(error, Base.name, key);\n // @ts-expect-error It’s a Node error.\n error.code = key;\n return error\n }\n}\n\nconst addCodeToName = hideStackFrames(\n /**\n * @param {Error} error\n * @param {string} name\n * @param {string} code\n * @returns {void}\n */\n function (error, name, code) {\n // Set the stack\n error = captureLargerStackTrace(error);\n // Add the error code to the name to include it in the stack trace.\n error.name = `${name} [${code}]`;\n // Access the stack to generate the error message including the error code\n // from the name.\n error.stack; // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n if (name === 'SystemError') {\n Object.defineProperty(error, 'name', {\n value: name,\n enumerable: false,\n writable: true,\n configurable: true\n });\n } else {\n delete error.name;\n }\n }\n);\n\n/**\n * @returns {boolean}\n */\nfunction isErrorStackTraceLimitWritable() {\n const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');\n if (desc === undefined) {\n return Object.isExtensible(Error)\n }\n\n return own$1.call(desc, 'writable') ? desc.writable : desc.set !== undefined\n}\n\n/**\n * This function removes unnecessary frames from Node.js core errors.\n * @template {(...args: unknown[]) => unknown} T\n * @type {(fn: T) => T}\n */\nfunction hideStackFrames(fn) {\n // We rename the functions that will be hidden to cut off the stacktrace\n // at the outermost one\n const hidden = nodeInternalPrefix + fn.name;\n Object.defineProperty(fn, 'name', {value: hidden});\n return fn\n}\n\nconst captureLargerStackTrace = hideStackFrames(\n /**\n * @param {Error} error\n * @returns {Error}\n */\n function (error) {\n const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();\n if (stackTraceLimitIsWritable) {\n userStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = Number.POSITIVE_INFINITY;\n }\n\n Error.captureStackTrace(error);\n\n // Reset the limit\n if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;\n\n return error\n }\n);\n\n/**\n * @param {string} key\n * @param {unknown[]} args\n * @param {Error} self\n * @returns {string}\n */\nfunction getMessage(key, args, self) {\n const message = messages.get(key);\n\n if (typeof message === 'function') {\n assert(\n message.length <= args.length, // Default options do not count.\n `Code: ${key}; The provided arguments length (${args.length}) does not ` +\n `match the required ones (${message.length}).`\n );\n return Reflect.apply(message, self, args)\n }\n\n const expectedLength = (message.match(/%[dfijoOs]/g) || []).length;\n assert(\n expectedLength === args.length,\n `Code: ${key}; The provided arguments length (${args.length}) does not ` +\n `match the required ones (${expectedLength}).`\n );\n if (args.length === 0) return message\n\n args.unshift(message);\n return Reflect.apply(format, null, args)\n}\n\n// Manually “tree shaken” from:\n\nconst {ERR_UNKNOWN_FILE_EXTENSION} = codes;\n\nconst extensionFormatMap = {\n __proto__: null,\n '.cjs': 'commonjs',\n '.js': 'module',\n '.mjs': 'module'\n};\n\n/**\n * @param {string} url\n * @returns {{format: string|null}}\n */\nfunction defaultGetFormat(url) {\n if (url.startsWith('node:')) {\n return {format: 'builtin'}\n }\n\n const parsed = new URL(url);\n\n if (parsed.protocol === 'data:') {\n const {1: mime} = /^([^/]+\\/[^;,]+)[^,]*?(;base64)?,/.exec(\n parsed.pathname\n ) || [null, null];\n const format = mime === 'text/javascript' ? 'module' : null;\n return {format}\n }\n\n if (parsed.protocol === 'file:') {\n const ext = path.extname(parsed.pathname);\n /** @type {string} */\n let format;\n if (ext === '.js') {\n format = getPackageType(parsed.href) === 'module' ? 'module' : 'commonjs';\n } else {\n format = extensionFormatMap[ext];\n }\n\n if (!format) {\n throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url))\n }\n\n return {format: format || null}\n }\n\n return {format: null}\n}\n\n// Manually “tree shaken” from:\n\nconst listOfBuiltins = builtins();\n\nconst {\n ERR_INVALID_MODULE_SPECIFIER,\n ERR_INVALID_PACKAGE_CONFIG,\n ERR_INVALID_PACKAGE_TARGET,\n ERR_MODULE_NOT_FOUND,\n ERR_PACKAGE_IMPORT_NOT_DEFINED,\n ERR_PACKAGE_PATH_NOT_EXPORTED,\n ERR_UNSUPPORTED_DIR_IMPORT,\n ERR_UNSUPPORTED_ESM_URL_SCHEME,\n ERR_INVALID_ARG_VALUE\n} = codes;\n\nconst own = {}.hasOwnProperty;\n\nconst DEFAULT_CONDITIONS = Object.freeze(['node', 'import']);\nconst DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);\n\nconst invalidSegmentRegEx = /(^|\\\\|\\/)(\\.\\.?|node_modules)(\\\\|\\/|$)/;\nconst patternRegEx = /\\*/g;\nconst encodedSepRegEx = /%2f|%2c/i;\n/** @type {Set} */\nconst emittedPackageWarnings = new Set();\n/** @type {Map} */\nconst packageJsonCache = new Map();\n\n/**\n * @param {string} match\n * @param {URL} pjsonUrl\n * @param {boolean} isExports\n * @param {URL} base\n * @returns {void}\n */\nfunction emitFolderMapDeprecation(match, pjsonUrl, isExports, base) {\n const pjsonPath = fileURLToPath(pjsonUrl);\n\n if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return\n emittedPackageWarnings.add(pjsonPath + '|' + match);\n process.emitWarning(\n `Use of deprecated folder mapping \"${match}\" in the ${\n isExports ? '\"exports\"' : '\"imports\"'\n } field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath(base)}` : ''\n }.\\n` +\n `Update this package.json to use a subpath pattern like \"${match}*\".`,\n 'DeprecationWarning',\n 'DEP0148'\n );\n}\n\n/**\n * @param {URL} url\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {unknown} [main]\n * @returns {void}\n */\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n const {format} = defaultGetFormat(url.href);\n if (format !== 'module') return\n const path = fileURLToPath(url.href);\n const pkgPath = fileURLToPath(new URL('.', packageJsonUrl));\n const basePath = fileURLToPath(base);\n if (main)\n process.emitWarning(\n `Package ${pkgPath} has a \"main\" field set to ${JSON.stringify(main)}, ` +\n `excluding the full filename and extension to the resolved file at \"${path.slice(\n pkgPath.length\n )}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is` +\n 'deprecated for ES modules.',\n 'DeprecationWarning',\n 'DEP0151'\n );\n else\n process.emitWarning(\n `No \"main\" or \"exports\" field defined in the package.json for ${pkgPath} resolving the main entry point \"${path.slice(\n pkgPath.length\n )}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`,\n 'DeprecationWarning',\n 'DEP0151'\n );\n}\n\n/**\n * @param {string[]} [conditions]\n * @returns {Set}\n */\nfunction getConditionsSet(conditions) {\n if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) {\n if (!Array.isArray(conditions)) {\n throw new ERR_INVALID_ARG_VALUE(\n 'conditions',\n conditions,\n 'expected an array'\n )\n }\n\n return new Set(conditions)\n }\n\n return DEFAULT_CONDITIONS_SET\n}\n\n/**\n * @param {string} path\n * @returns {Stats}\n */\nfunction tryStatSync(path) {\n // Note: from Node 15 onwards we can use `throwIfNoEntry: false` instead.\n try {\n return statSync(path)\n } catch {\n return new Stats()\n }\n}\n\n/**\n * @param {string} path\n * @param {string|URL} specifier Note: `specifier` is actually optional, not base.\n * @param {URL} [base]\n * @returns {PackageConfig}\n */\nfunction getPackageConfig(path, specifier, base) {\n const existing = packageJsonCache.get(path);\n if (existing !== undefined) {\n return existing\n }\n\n const source = reader.read(path).string;\n\n if (source === undefined) {\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: path,\n exists: false,\n main: undefined,\n name: undefined,\n type: 'none',\n exports: undefined,\n imports: undefined\n };\n packageJsonCache.set(path, packageConfig);\n return packageConfig\n }\n\n /** @type {Object.} */\n let packageJson;\n try {\n packageJson = JSON.parse(source);\n } catch (error) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n path,\n (base ? `\"${specifier}\" from ` : '') + fileURLToPath(base || specifier),\n error.message\n )\n }\n\n const {exports, imports, main, name, type} = packageJson;\n\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: path,\n exists: true,\n main: typeof main === 'string' ? main : undefined,\n name: typeof name === 'string' ? name : undefined,\n type: type === 'module' || type === 'commonjs' ? type : 'none',\n // @ts-expect-error Assume `Object.`.\n exports,\n // @ts-expect-error Assume `Object.`.\n imports: imports && typeof imports === 'object' ? imports : undefined\n };\n packageJsonCache.set(path, packageConfig);\n return packageConfig\n}\n\n/**\n * @param {URL|string} resolved\n * @returns {PackageConfig}\n */\nfunction getPackageScopeConfig(resolved) {\n let packageJsonUrl = new URL('./package.json', resolved);\n\n while (true) {\n const packageJsonPath = packageJsonUrl.pathname;\n\n if (packageJsonPath.endsWith('node_modules/package.json')) break\n\n const packageConfig = getPackageConfig(\n fileURLToPath(packageJsonUrl),\n resolved\n );\n if (packageConfig.exists) return packageConfig\n\n const lastPackageJsonUrl = packageJsonUrl;\n packageJsonUrl = new URL('../package.json', packageJsonUrl);\n\n // Terminates at root where ../package.json equals ../../package.json\n // (can't just check \"/package.json\" for Windows support).\n if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) break\n }\n\n const packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: packageJsonPath,\n exists: false,\n main: undefined,\n name: undefined,\n type: 'none',\n exports: undefined,\n imports: undefined\n };\n packageJsonCache.set(packageJsonPath, packageConfig);\n return packageConfig\n}\n\n/**\n * Legacy CommonJS main resolution:\n * 1. let M = pkg_url + (json main field)\n * 2. TRY(M, M.js, M.json, M.node)\n * 3. TRY(M/index.js, M/index.json, M/index.node)\n * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)\n * 5. NOT_FOUND\n *\n * @param {URL} url\n * @returns {boolean}\n */\nfunction fileExists(url) {\n return tryStatSync(fileURLToPath(url)).isFile()\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {PackageConfig} packageConfig\n * @param {URL} base\n * @returns {URL}\n */\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n /** @type {URL} */\n let guess;\n if (packageConfig.main !== undefined) {\n guess = new URL(`./${packageConfig.main}`, packageJsonUrl);\n // Note: fs check redundances will be handled by Descriptor cache here.\n if (fileExists(guess)) return guess\n\n const tries = [\n `./${packageConfig.main}.js`,\n `./${packageConfig.main}.json`,\n `./${packageConfig.main}.node`,\n `./${packageConfig.main}/index.js`,\n `./${packageConfig.main}/index.json`,\n `./${packageConfig.main}/index.node`\n ];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(\n guess,\n packageJsonUrl,\n base,\n packageConfig.main\n );\n return guess\n }\n // Fallthrough.\n }\n\n const tries = ['./index.js', './index.json', './index.node'];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n return guess\n }\n\n // Not found.\n throw new ERR_MODULE_NOT_FOUND(\n fileURLToPath(new URL('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {URL} resolved\n * @param {URL} base\n * @returns {URL}\n */\nfunction finalizeResolution(resolved, base) {\n if (encodedSepRegEx.test(resolved.pathname))\n throw new ERR_INVALID_MODULE_SPECIFIER(\n resolved.pathname,\n 'must not include encoded \"/\" or \"\\\\\" characters',\n fileURLToPath(base)\n )\n\n const path = fileURLToPath(resolved);\n\n const stats = tryStatSync(path.endsWith('/') ? path.slice(-1) : path);\n\n if (stats.isDirectory()) {\n const error = new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base));\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n if (!stats.isFile()) {\n throw new ERR_MODULE_NOT_FOUND(\n path || resolved.pathname,\n base && fileURLToPath(base),\n 'module'\n )\n }\n\n return resolved\n}\n\n/**\n * @param {string} specifier\n * @param {URL?} packageJsonUrl\n * @param {URL} base\n * @returns {never}\n */\nfunction throwImportNotDefined(specifier, packageJsonUrl, base) {\n throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(\n specifier,\n packageJsonUrl && fileURLToPath(new URL('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {never}\n */\nfunction throwExportsNotFound(subpath, packageJsonUrl, base) {\n throw new ERR_PACKAGE_PATH_NOT_EXPORTED(\n fileURLToPath(new URL('.', packageJsonUrl)),\n subpath,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidSubpath(subpath, packageJsonUrl, internal, base) {\n const reason = `request is not a valid subpath for the \"${\n internal ? 'imports' : 'exports'\n }\" resolution of ${fileURLToPath(packageJsonUrl)}`;\n\n throw new ERR_INVALID_MODULE_SPECIFIER(\n subpath,\n reason,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {unknown} target\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidPackageTarget(\n subpath,\n target,\n packageJsonUrl,\n internal,\n base\n) {\n target =\n typeof target === 'object' && target !== null\n ? JSON.stringify(target, null, '')\n : `${target}`;\n\n throw new ERR_INVALID_PACKAGE_TARGET(\n fileURLToPath(new URL('.', packageJsonUrl)),\n subpath,\n target,\n internal,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} target\n * @param {string} subpath\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {Set} conditions\n * @returns {URL}\n */\nfunction resolvePackageTargetString(\n target,\n subpath,\n match,\n packageJsonUrl,\n base,\n pattern,\n internal,\n conditions\n) {\n if (subpath !== '' && !pattern && target[target.length - 1] !== '/')\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\n if (!target.startsWith('./')) {\n if (internal && !target.startsWith('../') && !target.startsWith('/')) {\n let isURL = false;\n\n try {\n new URL(target);\n isURL = true;\n } catch {}\n\n if (!isURL) {\n const exportTarget = pattern\n ? target.replace(patternRegEx, subpath)\n : target + subpath;\n\n return packageResolve(exportTarget, packageJsonUrl, conditions)\n }\n }\n\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n }\n\n if (invalidSegmentRegEx.test(target.slice(2)))\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\n const resolved = new URL(target, packageJsonUrl);\n const resolvedPath = resolved.pathname;\n const packagePath = new URL('.', packageJsonUrl).pathname;\n\n if (!resolvedPath.startsWith(packagePath))\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\n if (subpath === '') return resolved\n\n if (invalidSegmentRegEx.test(subpath))\n throwInvalidSubpath(match + subpath, packageJsonUrl, internal, base);\n\n if (pattern) return new URL(resolved.href.replace(patternRegEx, subpath))\n return new URL(subpath, resolved)\n}\n\n/**\n * @param {string} key\n * @returns {boolean}\n */\nfunction isArrayIndex(key) {\n const keyNumber = Number(key);\n if (`${keyNumber}` !== key) return false\n return keyNumber >= 0 && keyNumber < 0xffff_ffff\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {unknown} target\n * @param {string} subpath\n * @param {string} packageSubpath\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {Set} conditions\n * @returns {URL}\n */\nfunction resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n conditions\n) {\n if (typeof target === 'string') {\n return resolvePackageTargetString(\n target,\n subpath,\n packageSubpath,\n packageJsonUrl,\n base,\n pattern,\n internal,\n conditions\n )\n }\n\n if (Array.isArray(target)) {\n /** @type {unknown[]} */\n const targetList = target;\n if (targetList.length === 0) return null\n\n /** @type {Error} */\n let lastException;\n let i = -1;\n\n while (++i < targetList.length) {\n const targetItem = targetList[i];\n /** @type {URL} */\n let resolved;\n try {\n resolved = resolvePackageTarget(\n packageJsonUrl,\n targetItem,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n conditions\n );\n } catch (error) {\n lastException = error;\n if (error.code === 'ERR_INVALID_PACKAGE_TARGET') continue\n throw error\n }\n\n if (resolved === undefined) continue\n\n if (resolved === null) {\n lastException = null;\n continue\n }\n\n return resolved\n }\n\n if (lastException === undefined || lastException === null) {\n // @ts-expect-error The diff between `undefined` and `null` seems to be\n // intentional\n return lastException\n }\n\n throw lastException\n }\n\n if (typeof target === 'object' && target !== null) {\n const keys = Object.getOwnPropertyNames(target);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (isArrayIndex(key)) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain numeric property keys.'\n )\n }\n }\n\n i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (key === 'default' || (conditions && conditions.has(key))) {\n /** @type {unknown} */\n const conditionalTarget = target[key];\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n conditionalTarget,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n conditions\n );\n if (resolved === undefined) continue\n return resolved\n }\n }\n\n return undefined\n }\n\n if (target === null) {\n return null\n }\n\n throwInvalidPackageTarget(\n packageSubpath,\n target,\n packageJsonUrl,\n internal,\n base\n );\n}\n\n/**\n * @param {unknown} exports\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {boolean}\n */\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n if (typeof exports === 'string' || Array.isArray(exports)) return true\n if (typeof exports !== 'object' || exports === null) return false\n\n const keys = Object.getOwnPropertyNames(exports);\n let isConditionalSugar = false;\n let i = 0;\n let j = -1;\n while (++j < keys.length) {\n const key = keys[j];\n const curIsConditionalSugar = key === '' || key[0] !== '.';\n if (i++ === 0) {\n isConditionalSugar = curIsConditionalSugar;\n } else if (isConditionalSugar !== curIsConditionalSugar) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain some keys starting with \\'.\\' and some not.' +\n ' The exports object must either be an object of package subpath keys' +\n ' or an object of main entry condition name keys only.'\n )\n }\n }\n\n return isConditionalSugar\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {string} packageSubpath\n * @param {Object.} packageConfig\n * @param {URL} base\n * @param {Set} conditions\n * @returns {ResolveObject}\n */\nfunction packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n) {\n let exports = packageConfig.exports;\n if (isConditionalExportsMainSugar(exports, packageJsonUrl, base))\n exports = {'.': exports};\n\n if (own.call(exports, packageSubpath)) {\n const target = exports[packageSubpath];\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n target,\n '',\n packageSubpath,\n base,\n false,\n false,\n conditions\n );\n if (resolved === null || resolved === undefined)\n throwExportsNotFound(packageSubpath, packageJsonUrl, base);\n return {resolved, exact: true}\n }\n\n let bestMatch = '';\n const keys = Object.getOwnPropertyNames(exports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (\n key[key.length - 1] === '*' &&\n packageSubpath.startsWith(key.slice(0, -1)) &&\n packageSubpath.length >= key.length &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n } else if (\n key[key.length - 1] === '/' &&\n packageSubpath.startsWith(key) &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n }\n }\n\n if (bestMatch) {\n const target = exports[bestMatch];\n const pattern = bestMatch[bestMatch.length - 1] === '*';\n const subpath = packageSubpath.slice(bestMatch.length - (pattern ? 1 : 0));\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n bestMatch,\n base,\n pattern,\n false,\n conditions\n );\n if (resolved === null || resolved === undefined)\n throwExportsNotFound(packageSubpath, packageJsonUrl, base);\n if (!pattern)\n emitFolderMapDeprecation(bestMatch, packageJsonUrl, true, base);\n return {resolved, exact: pattern}\n }\n\n throwExportsNotFound(packageSubpath, packageJsonUrl, base);\n}\n\n/**\n * @param {string} name\n * @param {URL} base\n * @param {Set} [conditions]\n * @returns {ResolveObject}\n */\nfunction packageImportsResolve(name, base, conditions) {\n if (name === '#' || name.startsWith('#/')) {\n const reason = 'is not a valid internal imports specifier name';\n throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base))\n }\n\n /** @type {URL} */\n let packageJsonUrl;\n\n const packageConfig = getPackageScopeConfig(base);\n\n if (packageConfig.exists) {\n packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n const imports = packageConfig.imports;\n if (imports) {\n if (own.call(imports, name)) {\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n imports[name],\n '',\n name,\n base,\n false,\n true,\n conditions\n );\n if (resolved !== null) return {resolved, exact: true}\n } else {\n let bestMatch = '';\n const keys = Object.getOwnPropertyNames(imports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n\n if (\n key[key.length - 1] === '*' &&\n name.startsWith(key.slice(0, -1)) &&\n name.length >= key.length &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n } else if (\n key[key.length - 1] === '/' &&\n name.startsWith(key) &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n }\n }\n\n if (bestMatch) {\n const target = imports[bestMatch];\n const pattern = bestMatch[bestMatch.length - 1] === '*';\n const subpath = name.slice(bestMatch.length - (pattern ? 1 : 0));\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n bestMatch,\n base,\n pattern,\n true,\n conditions\n );\n if (resolved !== null) {\n if (!pattern)\n emitFolderMapDeprecation(bestMatch, packageJsonUrl, false, base);\n return {resolved, exact: pattern}\n }\n }\n }\n }\n }\n\n throwImportNotDefined(name, packageJsonUrl, base);\n}\n\n/**\n * @param {string} url\n * @returns {PackageType}\n */\nfunction getPackageType(url) {\n const packageConfig = getPackageScopeConfig(url);\n return packageConfig.type\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n */\nfunction parsePackageName(specifier, base) {\n let separatorIndex = specifier.indexOf('/');\n let validPackageName = true;\n let isScoped = false;\n if (specifier[0] === '@') {\n isScoped = true;\n if (separatorIndex === -1 || specifier.length === 0) {\n validPackageName = false;\n } else {\n separatorIndex = specifier.indexOf('/', separatorIndex + 1);\n }\n }\n\n const packageName =\n separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\n // Package name cannot have leading . and cannot have percent-encoding or\n // separators.\n let i = -1;\n while (++i < packageName.length) {\n if (packageName[i] === '%' || packageName[i] === '\\\\') {\n validPackageName = false;\n break\n }\n }\n\n if (!validPackageName) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n specifier,\n 'is not a valid package name',\n fileURLToPath(base)\n )\n }\n\n const packageSubpath =\n '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex));\n\n return {packageName, packageSubpath, isScoped}\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n * @param {Set} conditions\n * @returns {URL}\n */\nfunction packageResolve(specifier, base, conditions) {\n const {packageName, packageSubpath, isScoped} = parsePackageName(\n specifier,\n base\n );\n\n // ResolveSelf\n const packageConfig = getPackageScopeConfig(base);\n\n // Can’t test.\n /* c8 ignore next 16 */\n if (packageConfig.exists) {\n const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n if (\n packageConfig.name === packageName &&\n packageConfig.exports !== undefined &&\n packageConfig.exports !== null\n ) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n ).resolved\n }\n }\n\n let packageJsonUrl = new URL(\n './node_modules/' + packageName + '/package.json',\n base\n );\n let packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {string} */\n let lastPath;\n do {\n const stat = tryStatSync(packageJsonPath.slice(0, -13));\n if (!stat.isDirectory()) {\n lastPath = packageJsonPath;\n packageJsonUrl = new URL(\n (isScoped ? '../../../../node_modules/' : '../../../node_modules/') +\n packageName +\n '/package.json',\n packageJsonUrl\n );\n packageJsonPath = fileURLToPath(packageJsonUrl);\n continue\n }\n\n // Package match.\n const packageConfig = getPackageConfig(packageJsonPath, specifier, base);\n if (packageConfig.exports !== undefined && packageConfig.exports !== null)\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n ).resolved\n if (packageSubpath === '.')\n return legacyMainResolve(packageJsonUrl, packageConfig, base)\n return new URL(packageSubpath, packageJsonUrl)\n // Cross-platform root check.\n } while (packageJsonPath.length !== lastPath.length)\n\n throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base))\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction isRelativeSpecifier(specifier) {\n if (specifier[0] === '.') {\n if (specifier.length === 1 || specifier[1] === '/') return true\n if (\n specifier[1] === '.' &&\n (specifier.length === 2 || specifier[2] === '/')\n ) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n if (specifier === '') return false\n if (specifier[0] === '/') return true\n return isRelativeSpecifier(specifier)\n}\n\n/**\n * The “Resolver Algorithm Specification” as detailed in the Node docs (which is\n * sync and slightly lower-level than `resolve`).\n *\n *\n *\n * @param {string} specifier\n * @param {URL} base\n * @param {Set} [conditions]\n * @returns {URL}\n */\nfunction moduleResolve(specifier, base, conditions) {\n // Order swapped from spec for minor perf gain.\n // Ok since relative URLs cannot parse as URLs.\n /** @type {URL} */\n let resolved;\n\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n resolved = new URL(specifier, base);\n } else if (specifier[0] === '#') {\n({resolved} = packageImportsResolve(specifier, base, conditions));\n } else {\n try {\n resolved = new URL(specifier);\n } catch {\n resolved = packageResolve(specifier, base, conditions);\n }\n }\n\n return finalizeResolution(resolved, base)\n}\n\n/**\n * @param {string} specifier\n * @param {{parentURL?: string, conditions?: string[]}} context\n * @returns {{url: string}}\n */\nfunction defaultResolve(specifier, context = {}) {\n const {parentURL} = context;\n /** @type {URL} */\n let parsed;\n\n try {\n parsed = new URL(specifier);\n if (parsed.protocol === 'data:') {\n return {url: specifier}\n }\n } catch {}\n\n if (parsed && parsed.protocol === 'node:') return {url: specifier}\n if (parsed && parsed.protocol !== 'file:' && parsed.protocol !== 'data:')\n throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed)\n\n if (listOfBuiltins.includes(specifier)) {\n return {url: 'node:' + specifier}\n }\n\n if (parentURL.startsWith('data:')) {\n // This is gonna blow up, we want the error\n new URL(specifier, parentURL);\n }\n\n const conditions = getConditionsSet(context.conditions);\n let url = moduleResolve(specifier, new URL(parentURL), conditions);\n\n const urlPath = fileURLToPath(url);\n const real = realpathSync(urlPath);\n const old = url;\n url = pathToFileURL(real + (urlPath.endsWith(path.sep) ? '/' : ''));\n url.search = old.search;\n url.hash = old.hash;\n\n return {url: `${url}`}\n}\n\n/**\n * Provides a module-relative resolution function scoped to each module,\n * returning the URL string.\n * `import.meta.resolve` also accepts a second argument which is the parent\n * module from which to resolve from.\n *\n * This function is asynchronous because the ES module resolver in Node.js is\n * allowed to be asynchronous.\n *\n * @param {string} specifier The module specifier to resolve relative to parent.\n * @param {string} parent The absolute parent module URL to resolve from.\n * You should pass `import.meta.url` or something else\n * @returns {Promise}\n */\nasync function resolve(specifier, parent) {\n if (!parent) {\n throw new Error(\n 'Please pass `parent`: `import-meta-resolve` cannot ponyfill that'\n )\n }\n\n try {\n return defaultResolve(specifier, {parentURL: parent}).url\n } catch (error) {\n return error.code === 'ERR_UNSUPPORTED_DIR_IMPORT'\n ? error.url\n : Promise.reject(error)\n }\n}\n\nexport { moduleResolve, resolve };\n"],"mappings":";;;;;;;AAoFA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAuC;AAAA;AAAA;AAAA;AAEvC,IAAIA,IAAI,GAAG;EAACC,OAAO,EAAE,CAAC;AAAC,CAAC;AAIxB,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AAE,KAAI2C,UAAG,EAAC+F,SAAS,CAAC,EAAEnE,UAAU,CAAC;EAElE,MAAMoE,OAAO,GAAG,IAAAzF,oBAAa,EAACvC,GAAG,CAAC;EAClC,MAAMiI,IAAI,GAAG,IAAAC,kBAAY,EAACF,OAAO,CAAC;EAClC,MAAMG,GAAG,GAAGnI,GAAG;EACfA,GAAG,GAAG,IAAAiH,oBAAa,EAACgB,IAAI,IAAID,OAAO,CAACrD,QAAQ,CAAC1H,OAAI,CAACmL,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC;EACnEpI,GAAG,CAACqI,MAAM,GAAGF,GAAG,CAACE,MAAM;EACvBrI,GAAG,CAACsI,IAAI,GAAGH,GAAG,CAACG,IAAI;EAEnB,OAAO;IAACtI,GAAG,EAAG,GAAEA,GAAI;EAAC,CAAC;AACxB;AAAC,SAgBcuI,OAAO;EAAA;AAAA;AAAA;EAAA,6BAAtB,WAAuBlJ,SAAS,EAAE5B,MAAM,EAAE;IACxC,IAAI,CAACA,MAAM,EAAE;MACX,MAAM,IAAI9Z,KAAK,CACb,kEAAkE,CACnE;IACH;IAEA,IAAI;MACF,OAAOkkB,cAAc,CAACxI,SAAS,EAAE;QAAC0I,SAAS,EAAEtK;MAAM,CAAC,CAAC,CAACuC,GAAG;IAC3D,CAAC,CAAC,OAAOriB,KAAK,EAAE;MACd,OAAOA,KAAK,CAAC6f,IAAI,KAAK,4BAA4B,GAC9C7f,KAAK,CAACqiB,GAAG,GACTwI,OAAO,CAACC,MAAM,CAAC9qB,KAAK,CAAC;IAC3B;EACF,CAAC;EAAA;AAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_url","data","require","_fs","_interopRequireWildcard","_path","_assert","_util","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","re$3","exports","SEMVER_SPEC_VERSION","MAX_LENGTH$2","MAX_SAFE_INTEGER$1","Number","MAX_SAFE_INTEGER","MAX_SAFE_COMPONENT_LENGTH","constants","MAX_LENGTH","debug$1","process","env","NODE_DEBUG","test","console","debug_1","module","debug","re","src","t","R","createToken","name","isGlobal","index","RegExp","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCE","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","opts","parseOptions$2","options","loose","filter","k","reduce","o","parseOptions_1","numeric","compareIdentifiers$1","a","b","anum","bnum","rcompareIdentifiers","identifiers","compareIdentifiers","MAX_LENGTH$1","re$2","t$2","parseOptions$1","SemVer$c","constructor","version","includePrerelease","TypeError","length","m","trim","match","LOOSE","FULL","raw","major","minor","patch","prerelease","split","map","id","num","build","format","join","toString","compare","other","compareMain","comparePre","i","compareBuild","inc","release","identifier","push","isNaN","Error","semver$2","re$1","t$1","SemVer$b","parseOptions","parse$5","r","er","parse_1","parse$4","valid$1","v","valid_1","parse$3","clean","s","replace","clean_1","SemVer$a","inc_1","SemVer$9","compare$a","compare_1","compare$9","eq$2","eq_1","parse$2","eq$1","diff","version1","version2","v1","v2","hasPre","prefix","defaultResult","diff_1","SemVer$8","major_1","SemVer$7","minor_1","SemVer$6","patch_1","parse$1","parsed","prerelease_1","compare$8","rcompare","rcompare_1","compare$7","compareLoose","compareLoose_1","SemVer$5","compareBuild$2","versionA","versionB","compareBuild_1","compareBuild$1","sort","list","sort_1","rsort","rsort_1","compare$6","gt$3","gt_1","compare$5","lt$2","lt_1","compare$4","neq$1","neq_1","compare$3","gte$2","gte_1","compare$2","lte$2","lte_1","eq","neq","gt$2","gte$1","lt$1","lte$1","cmp","op","cmp_1","SemVer$4","parse","coerce","String","rtl","next","COERCERTL","exec","lastIndex","coerce_1","iterator","hasRequiredIterator","requireIterator","Yallist","Symbol","walker","head","yallist","hasRequiredYallist","requireYallist","Node","create","tail","forEach","item","l","removeNode","node","prev","unshiftNode","pushNode","unshift","pop","res","shift","thisp","forEachReverse","n","getReverse","mapReverse","initial","acc","reduceReverse","toArray","arr","Array","toArrayReverse","slice","from","to","ret","sliceReverse","splice","start","deleteCount","nodes","insert","reverse","p","inserted","lruCache","hasRequiredLruCache","requireLruCache","MAX","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","max","Infinity","lc","stale","maxAge","dispose","noDisposeOnSet","updateAgeOnGet","reset","mL","allowStale","mA","lengthCalculator","lC","hit","itemCount","rforEach","forEachStep","keys","values","Map","dump","isStale","e","now","h","dumpLru","Date","len","del","Entry","peek","load","expiresAt","prune","doUse","delete","range","hasRequiredRange","requireRange","Range","Comparator","parseRange","c","first","isNullSet","isAny","comps","memoOpts","memoKey","cached","hr","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","TILDETRIM","CARETTRIM","rangeList","comp","parseComparator","replaceGTE0","COMPARATORLOOSE","rangeMap","comparators","size","result","intersects","some","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","LRU","requireComparator","remainingComparators","testComparator","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","toLowerCase","replaceTilde","TILDELOOSE","TILDE","_","M","pr","replaceCaret","CARETLOOSE","CARET","z","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","anyX","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","tM","tm","tp","tpr","tb","semver","ANY","allowed","comparator","hasRequiredComparator","operator","COMPARATOR","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","Range$8","satisfies$3","satisfies_1","Range$7","toComparators","toComparators_1","SemVer$3","Range$6","maxSatisfying","versions","maxSV","rangeObj","maxSatisfying_1","SemVer$2","Range$5","minSatisfying","min","minSV","minSatisfying_1","SemVer$1","Range$4","gt$1","minVersion","minver","setMin","compver","minVersion_1","Range$3","validRange","valid","Comparator$1","ANY$1","Range$2","satisfies$2","gt","lt","lte","gte","outside$2","hilo","gtfn","ltefn","ltfn","ecomp","high","low","outside_1","outside$1","gtr","gtr_1","outside","ltr","ltr_1","Range$1","r1","r2","intersects_1","satisfies$1","compare$1","simplify","included","ranges","simplified","original","satisfies","subset","sub","dom","sawNonNull","OUTER","simpleSub","simpleDom","isSub","simpleSubset","eqSet","Set","higherGT","lowerLT","add","gtltComp","higher","lower","hasDomLT","hasDomGT","needDomLTPre","needDomGTPre","subset_1","internalRe","semver$1","tokens","simplifyRange","builtins","experimental","coreModules","reader","read","jsonPath","find","path","dirname","dir","string","fs","readFileSync","toNamespacedPath","code","parent","isWindows","platform","own$1","codes","messages","nodeInternalPrefix","userStackTraceLimit","ERR_INVALID_MODULE_SPECIFIER","createError","request","reason","base","ERR_INVALID_PACKAGE_CONFIG","message","ERR_INVALID_PACKAGE_TARGET","pkgPath","target","isImport","relError","startsWith","assert","JSON","stringify","ERR_MODULE_NOT_FOUND","type","ERR_PACKAGE_IMPORT_NOT_DEFINED","specifier","packagePath","ERR_PACKAGE_PATH_NOT_EXPORTED","subpath","ERR_UNSUPPORTED_DIR_IMPORT","ERR_UNKNOWN_FILE_EXTENSION","ERR_INVALID_ARG_VALUE","inspected","inspect","includes","ERR_UNSUPPORTED_ESM_URL_SCHEME","url","protocol","sym","def","makeNodeErrorWithCode","Base","NodeError","limit","stackTraceLimit","isErrorStackTraceLimitWritable","getMessage","enumerable","writable","configurable","addCodeToName","hideStackFrames","captureLargerStackTrace","stack","isExtensible","hidden","stackTraceLimitIsWritable","POSITIVE_INFINITY","captureStackTrace","Reflect","expectedLength","extensionFormatMap","__proto__","defaultGetFormat","URL","mime","pathname","ext","extname","getPackageType","href","fileURLToPath","listOfBuiltins","own","DEFAULT_CONDITIONS","freeze","DEFAULT_CONDITIONS_SET","invalidSegmentRegEx","patternRegEx","encodedSepRegEx","emittedPackageWarnings","packageJsonCache","emitFolderMapDeprecation","pjsonUrl","isExports","pjsonPath","emitWarning","emitLegacyIndexDeprecation","packageJsonUrl","main","basePath","getConditionsSet","conditions","isArray","tryStatSync","statSync","_unused","Stats","getPackageConfig","existing","source","packageConfig","exists","imports","packageJson","getPackageScopeConfig","resolved","packageJsonPath","endsWith","lastPackageJsonUrl","fileExists","isFile","legacyMainResolve","guess","tries","finalizeResolution","stats","isDirectory","throwImportNotDefined","throwExportsNotFound","throwInvalidSubpath","internal","throwInvalidPackageTarget","resolvePackageTargetString","pattern","isURL","_unused2","exportTarget","packageResolve","resolvedPath","isArrayIndex","keyNumber","resolvePackageTarget","packageSubpath","targetList","lastException","targetItem","getOwnPropertyNames","conditionalTarget","isConditionalExportsMainSugar","isConditionalSugar","j","curIsConditionalSugar","packageExportsResolve","exact","bestMatch","packageImportsResolve","pathToFileURL","parsePackageName","separatorIndex","indexOf","validPackageName","isScoped","packageName","lastPath","stat","isRelativeSpecifier","shouldBeTreatedAsRelativeOrAbsolutePath","moduleResolve","_unused3","defaultResolve","context","parentURL","_unused4","urlPath","real","realpathSync","old","sep","search","hash","_x","_x2","_resolve"],"sources":["../../src/vendor/import-meta-resolve.js"],"sourcesContent":["\n/****************************************************************************\\\n * NOTE FROM BABEL AUTHORS *\n * This file is inlined from https://github.com/wooorm/import-meta-resolve, *\n * because we need to compile it to CommonJS. *\n\\****************************************************************************/\n\n/*\n(The MIT License)\n\nCopyright (c) 2021 Titus Wormer \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\n\nThis is a derivative work based on:\n.\nWhich is licensed:\n\n\"\"\"\nCopyright Node.js contributors. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n\nThis license applies to parts of Node.js originating from the\nhttps://github.com/joyent/node repository:\n\n\"\"\"\nCopyright Joyent, Inc. and other Node contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n*/\n\nimport { URL, fileURLToPath, pathToFileURL } from 'url';\nimport fs, { realpathSync, statSync, Stats } from 'fs';\nimport path from 'path';\nimport assert from 'assert';\nimport { format, inspect } from 'util';\n\nvar re$3 = {exports: {}};\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0';\n\nconst MAX_LENGTH$2 = 256;\nconst MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991;\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16;\n\nvar constants = {\n SEMVER_SPEC_VERSION,\n MAX_LENGTH: MAX_LENGTH$2,\n MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,\n MAX_SAFE_COMPONENT_LENGTH,\n};\n\nconst debug$1 = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {};\n\nvar debug_1 = debug$1;\n\n(function (module, exports) {\n\tconst { MAX_SAFE_COMPONENT_LENGTH } = constants;\n\tconst debug = debug_1;\n\texports = module.exports = {};\n\n\t// The actual regexps go on exports.re\n\tconst re = exports.re = [];\n\tconst src = exports.src = [];\n\tconst t = exports.t = {};\n\tlet R = 0;\n\n\tconst createToken = (name, value, isGlobal) => {\n\t const index = R++;\n\t debug(name, index, value);\n\t t[name] = index;\n\t src[index] = value;\n\t re[index] = new RegExp(value, isGlobal ? 'g' : undefined);\n\t};\n\n\t// The following Regular Expressions can be used for tokenizing,\n\t// validating, and parsing SemVer version strings.\n\n\t// ## Numeric Identifier\n\t// A single `0`, or a non-zero digit followed by zero or more digits.\n\n\tcreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*');\n\tcreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');\n\n\t// ## Non-numeric Identifier\n\t// Zero or more digits, followed by a letter or hyphen, and then zero or\n\t// more letters, digits, or hyphens.\n\n\tcreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*');\n\n\t// ## Main Version\n\t// Three dot-separated numeric identifiers.\n\n\tcreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIER]})`);\n\n\tcreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n\t `(${src[t.NUMERICIDENTIFIERLOOSE]})`);\n\n\t// ## Pre-release Version Identifier\n\t// A numeric identifier, or a non-numeric identifier.\n\n\tcreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n\t}|${src[t.NONNUMERICIDENTIFIER]})`);\n\n\tcreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n\t}|${src[t.NONNUMERICIDENTIFIER]})`);\n\n\t// ## Pre-release Version\n\t// Hyphen, followed by one or more dot-separated pre-release version\n\t// identifiers.\n\n\tcreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n\t}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`);\n\n\tcreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n\t}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);\n\n\t// ## Build Metadata Identifier\n\t// Any combination of digits, letters, or hyphens.\n\n\tcreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');\n\n\t// ## Build Metadata\n\t// Plus sign, followed by one or more period-separated build metadata\n\t// identifiers.\n\n\tcreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n\t}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`);\n\n\t// ## Full Version String\n\t// A main version, followed optionally by a pre-release version and\n\t// build metadata.\n\n\t// Note that the only major, minor, patch, and pre-release sections of\n\t// the version string are capturing groups. The build metadata is not a\n\t// capturing group, because it should not ever be used in version\n\t// comparison.\n\n\tcreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n\t}${src[t.PRERELEASE]}?${\n\t src[t.BUILD]}?`);\n\n\tcreateToken('FULL', `^${src[t.FULLPLAIN]}$`);\n\n\t// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n\t// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n\t// common in the npm registry.\n\tcreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n\t}${src[t.PRERELEASELOOSE]}?${\n\t src[t.BUILD]}?`);\n\n\tcreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);\n\n\tcreateToken('GTLT', '((?:<|>)?=?)');\n\n\t// Something like \"2.*\" or \"1.2.x\".\n\t// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n\t// Only the first item is strictly required.\n\tcreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n\tcreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n\n\tcreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n\t `(?:${src[t.PRERELEASE]})?${\n\t src[t.BUILD]}?` +\n\t `)?)?`);\n\n\tcreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n\t `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n\t `(?:${src[t.PRERELEASELOOSE]})?${\n\t src[t.BUILD]}?` +\n\t `)?)?`);\n\n\tcreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`);\n\tcreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`);\n\n\t// Coercion.\n\t// Extract anything that could conceivably be a part of a valid semver\n\tcreateToken('COERCE', `${'(^|[^\\\\d])' +\n\t '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n\t `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n\t `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n\t `(?:$|[^\\\\d])`);\n\tcreateToken('COERCERTL', src[t.COERCE], true);\n\n\t// Tilde ranges.\n\t// Meaning is \"reasonably at or greater than\"\n\tcreateToken('LONETILDE', '(?:~>?)');\n\n\tcreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true);\n\texports.tildeTrimReplace = '$1~';\n\n\tcreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);\n\n\t// Caret ranges.\n\t// Meaning is \"at least and backwards compatible with\"\n\tcreateToken('LONECARET', '(?:\\\\^)');\n\n\tcreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true);\n\texports.caretTrimReplace = '$1^';\n\n\tcreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);\n\n\t// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\n\tcreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`);\n\tcreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`);\n\n\t// An expression to strip any whitespace between the gtlt and the thing\n\t// it modifies, so that `> 1.2.3` ==> `>1.2.3`\n\tcreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n\t}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);\n\texports.comparatorTrimReplace = '$1$2$3';\n\n\t// Something like `1.2.3 - 1.2.4`\n\t// Note that these all use the loose form, because they'll be\n\t// checked against either the strict or loose comparator form\n\t// later.\n\tcreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n\t `\\\\s+-\\\\s+` +\n\t `(${src[t.XRANGEPLAIN]})` +\n\t `\\\\s*$`);\n\n\tcreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n\t `\\\\s+-\\\\s+` +\n\t `(${src[t.XRANGEPLAINLOOSE]})` +\n\t `\\\\s*$`);\n\n\t// Star ranges basically just allow anything at all.\n\tcreateToken('STAR', '(<|>)?=?\\\\s*\\\\*');\n\t// >=0.0.0 is like a star\n\tcreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$');\n\tcreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$');\n} (re$3, re$3.exports));\n\n// parse out just the options we care about so we always get a consistent\n// obj with keys in a consistent order.\nconst opts = ['includePrerelease', 'loose', 'rtl'];\nconst parseOptions$2 = options =>\n !options ? {}\n : typeof options !== 'object' ? { loose: true }\n : opts.filter(k => options[k]).reduce((o, k) => {\n o[k] = true;\n return o\n }, {});\nvar parseOptions_1 = parseOptions$2;\n\nconst numeric = /^[0-9]+$/;\nconst compareIdentifiers$1 = (a, b) => {\n const anum = numeric.test(a);\n const bnum = numeric.test(b);\n\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n};\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);\n\nvar identifiers = {\n compareIdentifiers: compareIdentifiers$1,\n rcompareIdentifiers,\n};\n\nconst debug = debug_1;\nconst { MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_INTEGER } = constants;\nconst { re: re$2, t: t$2 } = re$3.exports;\n\nconst parseOptions$1 = parseOptions_1;\nconst { compareIdentifiers } = identifiers;\nclass SemVer$c {\n constructor (version, options) {\n options = parseOptions$1(options);\n\n if (version instanceof SemVer$c) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version;\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH$1) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH$1} characters`\n )\n }\n\n debug('SemVer', version, options);\n this.options = options;\n this.loose = !!options.loose;\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease;\n\n const m = version.trim().match(options.loose ? re$2[t$2.LOOSE] : re$2[t$2.FULL]);\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version;\n\n // these are actually numbers\n this.major = +m[1];\n this.minor = +m[2];\n this.patch = +m[3];\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id;\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n });\n }\n\n this.build = m[5] ? m[5].split('.') : [];\n this.format();\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`;\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other);\n if (!(other instanceof SemVer$c)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer$c(other, this.options);\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer$c)) {\n other = new SemVer$c(other, this.options);\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer$c)) {\n other = new SemVer$c(other, this.options);\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0;\n do {\n const a = this.prerelease[i];\n const b = other.prerelease[i];\n debug('prerelease compare', i, a, b);\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer$c)) {\n other = new SemVer$c(other, this.options);\n }\n\n let i = 0;\n do {\n const a = this.build[i];\n const b = other.build[i];\n debug('prerelease compare', i, a, b);\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc('pre', identifier);\n break\n case 'preminor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc('pre', identifier);\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0;\n this.inc('patch', identifier);\n this.inc('pre', identifier);\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier);\n }\n this.inc('pre', identifier);\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0];\n } else {\n let i = this.prerelease.length;\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++;\n i = -2;\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0);\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0];\n }\n } else {\n this.prerelease = [identifier, 0];\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format();\n this.raw = this.version;\n return this\n }\n}\n\nvar semver$2 = SemVer$c;\n\nconst { MAX_LENGTH } = constants;\nconst { re: re$1, t: t$1 } = re$3.exports;\nconst SemVer$b = semver$2;\n\nconst parseOptions = parseOptions_1;\nconst parse$5 = (version, options) => {\n options = parseOptions(options);\n\n if (version instanceof SemVer$b) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n const r = options.loose ? re$1[t$1.LOOSE] : re$1[t$1.FULL];\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer$b(version, options)\n } catch (er) {\n return null\n }\n};\n\nvar parse_1 = parse$5;\n\nconst parse$4 = parse_1;\nconst valid$1 = (version, options) => {\n const v = parse$4(version, options);\n return v ? v.version : null\n};\nvar valid_1 = valid$1;\n\nconst parse$3 = parse_1;\nconst clean = (version, options) => {\n const s = parse$3(version.trim().replace(/^[=v]+/, ''), options);\n return s ? s.version : null\n};\nvar clean_1 = clean;\n\nconst SemVer$a = semver$2;\n\nconst inc = (version, release, options, identifier) => {\n if (typeof (options) === 'string') {\n identifier = options;\n options = undefined;\n }\n\n try {\n return new SemVer$a(\n version instanceof SemVer$a ? version.version : version,\n options\n ).inc(release, identifier).version\n } catch (er) {\n return null\n }\n};\nvar inc_1 = inc;\n\nconst SemVer$9 = semver$2;\nconst compare$a = (a, b, loose) =>\n new SemVer$9(a, loose).compare(new SemVer$9(b, loose));\n\nvar compare_1 = compare$a;\n\nconst compare$9 = compare_1;\nconst eq$2 = (a, b, loose) => compare$9(a, b, loose) === 0;\nvar eq_1 = eq$2;\n\nconst parse$2 = parse_1;\nconst eq$1 = eq_1;\n\nconst diff = (version1, version2) => {\n if (eq$1(version1, version2)) {\n return null\n } else {\n const v1 = parse$2(version1);\n const v2 = parse$2(version2);\n const hasPre = v1.prerelease.length || v2.prerelease.length;\n const prefix = hasPre ? 'pre' : '';\n const defaultResult = hasPre ? 'prerelease' : '';\n for (const key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n};\nvar diff_1 = diff;\n\nconst SemVer$8 = semver$2;\nconst major = (a, loose) => new SemVer$8(a, loose).major;\nvar major_1 = major;\n\nconst SemVer$7 = semver$2;\nconst minor = (a, loose) => new SemVer$7(a, loose).minor;\nvar minor_1 = minor;\n\nconst SemVer$6 = semver$2;\nconst patch = (a, loose) => new SemVer$6(a, loose).patch;\nvar patch_1 = patch;\n\nconst parse$1 = parse_1;\nconst prerelease = (version, options) => {\n const parsed = parse$1(version, options);\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n};\nvar prerelease_1 = prerelease;\n\nconst compare$8 = compare_1;\nconst rcompare = (a, b, loose) => compare$8(b, a, loose);\nvar rcompare_1 = rcompare;\n\nconst compare$7 = compare_1;\nconst compareLoose = (a, b) => compare$7(a, b, true);\nvar compareLoose_1 = compareLoose;\n\nconst SemVer$5 = semver$2;\nconst compareBuild$2 = (a, b, loose) => {\n const versionA = new SemVer$5(a, loose);\n const versionB = new SemVer$5(b, loose);\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n};\nvar compareBuild_1 = compareBuild$2;\n\nconst compareBuild$1 = compareBuild_1;\nconst sort = (list, loose) => list.sort((a, b) => compareBuild$1(a, b, loose));\nvar sort_1 = sort;\n\nconst compareBuild = compareBuild_1;\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));\nvar rsort_1 = rsort;\n\nconst compare$6 = compare_1;\nconst gt$3 = (a, b, loose) => compare$6(a, b, loose) > 0;\nvar gt_1 = gt$3;\n\nconst compare$5 = compare_1;\nconst lt$2 = (a, b, loose) => compare$5(a, b, loose) < 0;\nvar lt_1 = lt$2;\n\nconst compare$4 = compare_1;\nconst neq$1 = (a, b, loose) => compare$4(a, b, loose) !== 0;\nvar neq_1 = neq$1;\n\nconst compare$3 = compare_1;\nconst gte$2 = (a, b, loose) => compare$3(a, b, loose) >= 0;\nvar gte_1 = gte$2;\n\nconst compare$2 = compare_1;\nconst lte$2 = (a, b, loose) => compare$2(a, b, loose) <= 0;\nvar lte_1 = lte$2;\n\nconst eq = eq_1;\nconst neq = neq_1;\nconst gt$2 = gt_1;\nconst gte$1 = gte_1;\nconst lt$1 = lt_1;\nconst lte$1 = lte_1;\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version;\n }\n if (typeof b === 'object') {\n b = b.version;\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version;\n }\n if (typeof b === 'object') {\n b = b.version;\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt$2(a, b, loose)\n\n case '>=':\n return gte$1(a, b, loose)\n\n case '<':\n return lt$1(a, b, loose)\n\n case '<=':\n return lte$1(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n};\nvar cmp_1 = cmp;\n\nconst SemVer$4 = semver$2;\nconst parse = parse_1;\nconst { re, t } = re$3.exports;\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer$4) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version);\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {};\n\n let match = null;\n if (!options.rtl) {\n match = version.match(re[t.COERCE]);\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next;\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next;\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1;\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n};\nvar coerce_1 = coerce;\n\nvar iterator;\nvar hasRequiredIterator;\n\nfunction requireIterator () {\n\tif (hasRequiredIterator) return iterator;\n\thasRequiredIterator = 1;\n\titerator = function (Yallist) {\n\t Yallist.prototype[Symbol.iterator] = function* () {\n\t for (let walker = this.head; walker; walker = walker.next) {\n\t yield walker.value;\n\t }\n\t };\n\t};\n\treturn iterator;\n}\n\nvar yallist;\nvar hasRequiredYallist;\n\nfunction requireYallist () {\n\tif (hasRequiredYallist) return yallist;\n\thasRequiredYallist = 1;\n\tyallist = Yallist;\n\n\tYallist.Node = Node;\n\tYallist.create = Yallist;\n\n\tfunction Yallist (list) {\n\t var self = this;\n\t if (!(self instanceof Yallist)) {\n\t self = new Yallist();\n\t }\n\n\t self.tail = null;\n\t self.head = null;\n\t self.length = 0;\n\n\t if (list && typeof list.forEach === 'function') {\n\t list.forEach(function (item) {\n\t self.push(item);\n\t });\n\t } else if (arguments.length > 0) {\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t self.push(arguments[i]);\n\t }\n\t }\n\n\t return self\n\t}\n\n\tYallist.prototype.removeNode = function (node) {\n\t if (node.list !== this) {\n\t throw new Error('removing node which does not belong to this list')\n\t }\n\n\t var next = node.next;\n\t var prev = node.prev;\n\n\t if (next) {\n\t next.prev = prev;\n\t }\n\n\t if (prev) {\n\t prev.next = next;\n\t }\n\n\t if (node === this.head) {\n\t this.head = next;\n\t }\n\t if (node === this.tail) {\n\t this.tail = prev;\n\t }\n\n\t node.list.length--;\n\t node.next = null;\n\t node.prev = null;\n\t node.list = null;\n\n\t return next\n\t};\n\n\tYallist.prototype.unshiftNode = function (node) {\n\t if (node === this.head) {\n\t return\n\t }\n\n\t if (node.list) {\n\t node.list.removeNode(node);\n\t }\n\n\t var head = this.head;\n\t node.list = this;\n\t node.next = head;\n\t if (head) {\n\t head.prev = node;\n\t }\n\n\t this.head = node;\n\t if (!this.tail) {\n\t this.tail = node;\n\t }\n\t this.length++;\n\t};\n\n\tYallist.prototype.pushNode = function (node) {\n\t if (node === this.tail) {\n\t return\n\t }\n\n\t if (node.list) {\n\t node.list.removeNode(node);\n\t }\n\n\t var tail = this.tail;\n\t node.list = this;\n\t node.prev = tail;\n\t if (tail) {\n\t tail.next = node;\n\t }\n\n\t this.tail = node;\n\t if (!this.head) {\n\t this.head = node;\n\t }\n\t this.length++;\n\t};\n\n\tYallist.prototype.push = function () {\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t push(this, arguments[i]);\n\t }\n\t return this.length\n\t};\n\n\tYallist.prototype.unshift = function () {\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t unshift(this, arguments[i]);\n\t }\n\t return this.length\n\t};\n\n\tYallist.prototype.pop = function () {\n\t if (!this.tail) {\n\t return undefined\n\t }\n\n\t var res = this.tail.value;\n\t this.tail = this.tail.prev;\n\t if (this.tail) {\n\t this.tail.next = null;\n\t } else {\n\t this.head = null;\n\t }\n\t this.length--;\n\t return res\n\t};\n\n\tYallist.prototype.shift = function () {\n\t if (!this.head) {\n\t return undefined\n\t }\n\n\t var res = this.head.value;\n\t this.head = this.head.next;\n\t if (this.head) {\n\t this.head.prev = null;\n\t } else {\n\t this.tail = null;\n\t }\n\t this.length--;\n\t return res\n\t};\n\n\tYallist.prototype.forEach = function (fn, thisp) {\n\t thisp = thisp || this;\n\t for (var walker = this.head, i = 0; walker !== null; i++) {\n\t fn.call(thisp, walker.value, i, this);\n\t walker = walker.next;\n\t }\n\t};\n\n\tYallist.prototype.forEachReverse = function (fn, thisp) {\n\t thisp = thisp || this;\n\t for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n\t fn.call(thisp, walker.value, i, this);\n\t walker = walker.prev;\n\t }\n\t};\n\n\tYallist.prototype.get = function (n) {\n\t for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n\t // abort out of the list early if we hit a cycle\n\t walker = walker.next;\n\t }\n\t if (i === n && walker !== null) {\n\t return walker.value\n\t }\n\t};\n\n\tYallist.prototype.getReverse = function (n) {\n\t for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n\t // abort out of the list early if we hit a cycle\n\t walker = walker.prev;\n\t }\n\t if (i === n && walker !== null) {\n\t return walker.value\n\t }\n\t};\n\n\tYallist.prototype.map = function (fn, thisp) {\n\t thisp = thisp || this;\n\t var res = new Yallist();\n\t for (var walker = this.head; walker !== null;) {\n\t res.push(fn.call(thisp, walker.value, this));\n\t walker = walker.next;\n\t }\n\t return res\n\t};\n\n\tYallist.prototype.mapReverse = function (fn, thisp) {\n\t thisp = thisp || this;\n\t var res = new Yallist();\n\t for (var walker = this.tail; walker !== null;) {\n\t res.push(fn.call(thisp, walker.value, this));\n\t walker = walker.prev;\n\t }\n\t return res\n\t};\n\n\tYallist.prototype.reduce = function (fn, initial) {\n\t var acc;\n\t var walker = this.head;\n\t if (arguments.length > 1) {\n\t acc = initial;\n\t } else if (this.head) {\n\t walker = this.head.next;\n\t acc = this.head.value;\n\t } else {\n\t throw new TypeError('Reduce of empty list with no initial value')\n\t }\n\n\t for (var i = 0; walker !== null; i++) {\n\t acc = fn(acc, walker.value, i);\n\t walker = walker.next;\n\t }\n\n\t return acc\n\t};\n\n\tYallist.prototype.reduceReverse = function (fn, initial) {\n\t var acc;\n\t var walker = this.tail;\n\t if (arguments.length > 1) {\n\t acc = initial;\n\t } else if (this.tail) {\n\t walker = this.tail.prev;\n\t acc = this.tail.value;\n\t } else {\n\t throw new TypeError('Reduce of empty list with no initial value')\n\t }\n\n\t for (var i = this.length - 1; walker !== null; i--) {\n\t acc = fn(acc, walker.value, i);\n\t walker = walker.prev;\n\t }\n\n\t return acc\n\t};\n\n\tYallist.prototype.toArray = function () {\n\t var arr = new Array(this.length);\n\t for (var i = 0, walker = this.head; walker !== null; i++) {\n\t arr[i] = walker.value;\n\t walker = walker.next;\n\t }\n\t return arr\n\t};\n\n\tYallist.prototype.toArrayReverse = function () {\n\t var arr = new Array(this.length);\n\t for (var i = 0, walker = this.tail; walker !== null; i++) {\n\t arr[i] = walker.value;\n\t walker = walker.prev;\n\t }\n\t return arr\n\t};\n\n\tYallist.prototype.slice = function (from, to) {\n\t to = to || this.length;\n\t if (to < 0) {\n\t to += this.length;\n\t }\n\t from = from || 0;\n\t if (from < 0) {\n\t from += this.length;\n\t }\n\t var ret = new Yallist();\n\t if (to < from || to < 0) {\n\t return ret\n\t }\n\t if (from < 0) {\n\t from = 0;\n\t }\n\t if (to > this.length) {\n\t to = this.length;\n\t }\n\t for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n\t walker = walker.next;\n\t }\n\t for (; walker !== null && i < to; i++, walker = walker.next) {\n\t ret.push(walker.value);\n\t }\n\t return ret\n\t};\n\n\tYallist.prototype.sliceReverse = function (from, to) {\n\t to = to || this.length;\n\t if (to < 0) {\n\t to += this.length;\n\t }\n\t from = from || 0;\n\t if (from < 0) {\n\t from += this.length;\n\t }\n\t var ret = new Yallist();\n\t if (to < from || to < 0) {\n\t return ret\n\t }\n\t if (from < 0) {\n\t from = 0;\n\t }\n\t if (to > this.length) {\n\t to = this.length;\n\t }\n\t for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n\t walker = walker.prev;\n\t }\n\t for (; walker !== null && i > from; i--, walker = walker.prev) {\n\t ret.push(walker.value);\n\t }\n\t return ret\n\t};\n\n\tYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n\t if (start > this.length) {\n\t start = this.length - 1;\n\t }\n\t if (start < 0) {\n\t start = this.length + start;\n\t }\n\n\t for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n\t walker = walker.next;\n\t }\n\n\t var ret = [];\n\t for (var i = 0; walker && i < deleteCount; i++) {\n\t ret.push(walker.value);\n\t walker = this.removeNode(walker);\n\t }\n\t if (walker === null) {\n\t walker = this.tail;\n\t }\n\n\t if (walker !== this.head && walker !== this.tail) {\n\t walker = walker.prev;\n\t }\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t walker = insert(this, walker, nodes[i]);\n\t }\n\t return ret;\n\t};\n\n\tYallist.prototype.reverse = function () {\n\t var head = this.head;\n\t var tail = this.tail;\n\t for (var walker = head; walker !== null; walker = walker.prev) {\n\t var p = walker.prev;\n\t walker.prev = walker.next;\n\t walker.next = p;\n\t }\n\t this.head = tail;\n\t this.tail = head;\n\t return this\n\t};\n\n\tfunction insert (self, node, value) {\n\t var inserted = node === self.head ?\n\t new Node(value, null, node, self) :\n\t new Node(value, node, node.next, self);\n\n\t if (inserted.next === null) {\n\t self.tail = inserted;\n\t }\n\t if (inserted.prev === null) {\n\t self.head = inserted;\n\t }\n\n\t self.length++;\n\n\t return inserted\n\t}\n\n\tfunction push (self, item) {\n\t self.tail = new Node(item, self.tail, null, self);\n\t if (!self.head) {\n\t self.head = self.tail;\n\t }\n\t self.length++;\n\t}\n\n\tfunction unshift (self, item) {\n\t self.head = new Node(item, null, self.head, self);\n\t if (!self.tail) {\n\t self.tail = self.head;\n\t }\n\t self.length++;\n\t}\n\n\tfunction Node (value, prev, next, list) {\n\t if (!(this instanceof Node)) {\n\t return new Node(value, prev, next, list)\n\t }\n\n\t this.list = list;\n\t this.value = value;\n\n\t if (prev) {\n\t prev.next = this;\n\t this.prev = prev;\n\t } else {\n\t this.prev = null;\n\t }\n\n\t if (next) {\n\t next.prev = this;\n\t this.next = next;\n\t } else {\n\t this.next = null;\n\t }\n\t}\n\n\ttry {\n\t // add if support for Symbol.iterator is present\n\t requireIterator()(Yallist);\n\t} catch (er) {}\n\treturn yallist;\n}\n\nvar lruCache;\nvar hasRequiredLruCache;\n\nfunction requireLruCache () {\n\tif (hasRequiredLruCache) return lruCache;\n\thasRequiredLruCache = 1;\n\n\t// A linked list to keep track of recently-used-ness\n\tconst Yallist = requireYallist();\n\n\tconst MAX = Symbol('max');\n\tconst LENGTH = Symbol('length');\n\tconst LENGTH_CALCULATOR = Symbol('lengthCalculator');\n\tconst ALLOW_STALE = Symbol('allowStale');\n\tconst MAX_AGE = Symbol('maxAge');\n\tconst DISPOSE = Symbol('dispose');\n\tconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');\n\tconst LRU_LIST = Symbol('lruList');\n\tconst CACHE = Symbol('cache');\n\tconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');\n\n\tconst naiveLength = () => 1;\n\n\t// lruList is a yallist where the head is the youngest\n\t// item, and the tail is the oldest. the list contains the Hit\n\t// objects as the entries.\n\t// Each Hit object has a reference to its Yallist.Node. This\n\t// never changes.\n\t//\n\t// cache is a Map (or PseudoMap) that matches the keys to\n\t// the Yallist.Node object.\n\tclass LRUCache {\n\t constructor (options) {\n\t if (typeof options === 'number')\n\t options = { max: options };\n\n\t if (!options)\n\t options = {};\n\n\t if (options.max && (typeof options.max !== 'number' || options.max < 0))\n\t throw new TypeError('max must be a non-negative number')\n\t // Kind of weird to have a default max of Infinity, but oh well.\n\t this[MAX] = options.max || Infinity;\n\n\t const lc = options.length || naiveLength;\n\t this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;\n\t this[ALLOW_STALE] = options.stale || false;\n\t if (options.maxAge && typeof options.maxAge !== 'number')\n\t throw new TypeError('maxAge must be a number')\n\t this[MAX_AGE] = options.maxAge || 0;\n\t this[DISPOSE] = options.dispose;\n\t this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;\n\t this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;\n\t this.reset();\n\t }\n\n\t // resize the cache when the max changes.\n\t set max (mL) {\n\t if (typeof mL !== 'number' || mL < 0)\n\t throw new TypeError('max must be a non-negative number')\n\n\t this[MAX] = mL || Infinity;\n\t trim(this);\n\t }\n\t get max () {\n\t return this[MAX]\n\t }\n\n\t set allowStale (allowStale) {\n\t this[ALLOW_STALE] = !!allowStale;\n\t }\n\t get allowStale () {\n\t return this[ALLOW_STALE]\n\t }\n\n\t set maxAge (mA) {\n\t if (typeof mA !== 'number')\n\t throw new TypeError('maxAge must be a non-negative number')\n\n\t this[MAX_AGE] = mA;\n\t trim(this);\n\t }\n\t get maxAge () {\n\t return this[MAX_AGE]\n\t }\n\n\t // resize the cache when the lengthCalculator changes.\n\t set lengthCalculator (lC) {\n\t if (typeof lC !== 'function')\n\t lC = naiveLength;\n\n\t if (lC !== this[LENGTH_CALCULATOR]) {\n\t this[LENGTH_CALCULATOR] = lC;\n\t this[LENGTH] = 0;\n\t this[LRU_LIST].forEach(hit => {\n\t hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);\n\t this[LENGTH] += hit.length;\n\t });\n\t }\n\t trim(this);\n\t }\n\t get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n\t get length () { return this[LENGTH] }\n\t get itemCount () { return this[LRU_LIST].length }\n\n\t rforEach (fn, thisp) {\n\t thisp = thisp || this;\n\t for (let walker = this[LRU_LIST].tail; walker !== null;) {\n\t const prev = walker.prev;\n\t forEachStep(this, fn, walker, thisp);\n\t walker = prev;\n\t }\n\t }\n\n\t forEach (fn, thisp) {\n\t thisp = thisp || this;\n\t for (let walker = this[LRU_LIST].head; walker !== null;) {\n\t const next = walker.next;\n\t forEachStep(this, fn, walker, thisp);\n\t walker = next;\n\t }\n\t }\n\n\t keys () {\n\t return this[LRU_LIST].toArray().map(k => k.key)\n\t }\n\n\t values () {\n\t return this[LRU_LIST].toArray().map(k => k.value)\n\t }\n\n\t reset () {\n\t if (this[DISPOSE] &&\n\t this[LRU_LIST] &&\n\t this[LRU_LIST].length) {\n\t this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));\n\t }\n\n\t this[CACHE] = new Map(); // hash of items by key\n\t this[LRU_LIST] = new Yallist(); // list of items in order of use recency\n\t this[LENGTH] = 0; // length of items in the list\n\t }\n\n\t dump () {\n\t return this[LRU_LIST].map(hit =>\n\t isStale(this, hit) ? false : {\n\t k: hit.key,\n\t v: hit.value,\n\t e: hit.now + (hit.maxAge || 0)\n\t }).toArray().filter(h => h)\n\t }\n\n\t dumpLru () {\n\t return this[LRU_LIST]\n\t }\n\n\t set (key, value, maxAge) {\n\t maxAge = maxAge || this[MAX_AGE];\n\n\t if (maxAge && typeof maxAge !== 'number')\n\t throw new TypeError('maxAge must be a number')\n\n\t const now = maxAge ? Date.now() : 0;\n\t const len = this[LENGTH_CALCULATOR](value, key);\n\n\t if (this[CACHE].has(key)) {\n\t if (len > this[MAX]) {\n\t del(this, this[CACHE].get(key));\n\t return false\n\t }\n\n\t const node = this[CACHE].get(key);\n\t const item = node.value;\n\n\t // dispose of the old one before overwriting\n\t // split out into 2 ifs for better coverage tracking\n\t if (this[DISPOSE]) {\n\t if (!this[NO_DISPOSE_ON_SET])\n\t this[DISPOSE](key, item.value);\n\t }\n\n\t item.now = now;\n\t item.maxAge = maxAge;\n\t item.value = value;\n\t this[LENGTH] += len - item.length;\n\t item.length = len;\n\t this.get(key);\n\t trim(this);\n\t return true\n\t }\n\n\t const hit = new Entry(key, value, len, now, maxAge);\n\n\t // oversized objects fall out of cache automatically.\n\t if (hit.length > this[MAX]) {\n\t if (this[DISPOSE])\n\t this[DISPOSE](key, value);\n\n\t return false\n\t }\n\n\t this[LENGTH] += hit.length;\n\t this[LRU_LIST].unshift(hit);\n\t this[CACHE].set(key, this[LRU_LIST].head);\n\t trim(this);\n\t return true\n\t }\n\n\t has (key) {\n\t if (!this[CACHE].has(key)) return false\n\t const hit = this[CACHE].get(key).value;\n\t return !isStale(this, hit)\n\t }\n\n\t get (key) {\n\t return get(this, key, true)\n\t }\n\n\t peek (key) {\n\t return get(this, key, false)\n\t }\n\n\t pop () {\n\t const node = this[LRU_LIST].tail;\n\t if (!node)\n\t return null\n\n\t del(this, node);\n\t return node.value\n\t }\n\n\t del (key) {\n\t del(this, this[CACHE].get(key));\n\t }\n\n\t load (arr) {\n\t // reset the cache\n\t this.reset();\n\n\t const now = Date.now();\n\t // A previous serialized cache has the most recent items first\n\t for (let l = arr.length - 1; l >= 0; l--) {\n\t const hit = arr[l];\n\t const expiresAt = hit.e || 0;\n\t if (expiresAt === 0)\n\t // the item was created without expiration in a non aged cache\n\t this.set(hit.k, hit.v);\n\t else {\n\t const maxAge = expiresAt - now;\n\t // dont add already expired items\n\t if (maxAge > 0) {\n\t this.set(hit.k, hit.v, maxAge);\n\t }\n\t }\n\t }\n\t }\n\n\t prune () {\n\t this[CACHE].forEach((value, key) => get(this, key, false));\n\t }\n\t}\n\n\tconst get = (self, key, doUse) => {\n\t const node = self[CACHE].get(key);\n\t if (node) {\n\t const hit = node.value;\n\t if (isStale(self, hit)) {\n\t del(self, node);\n\t if (!self[ALLOW_STALE])\n\t return undefined\n\t } else {\n\t if (doUse) {\n\t if (self[UPDATE_AGE_ON_GET])\n\t node.value.now = Date.now();\n\t self[LRU_LIST].unshiftNode(node);\n\t }\n\t }\n\t return hit.value\n\t }\n\t};\n\n\tconst isStale = (self, hit) => {\n\t if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n\t return false\n\n\t const diff = Date.now() - hit.now;\n\t return hit.maxAge ? diff > hit.maxAge\n\t : self[MAX_AGE] && (diff > self[MAX_AGE])\n\t};\n\n\tconst trim = self => {\n\t if (self[LENGTH] > self[MAX]) {\n\t for (let walker = self[LRU_LIST].tail;\n\t self[LENGTH] > self[MAX] && walker !== null;) {\n\t // We know that we're about to delete this one, and also\n\t // what the next least recently used key will be, so just\n\t // go ahead and set it now.\n\t const prev = walker.prev;\n\t del(self, walker);\n\t walker = prev;\n\t }\n\t }\n\t};\n\n\tconst del = (self, node) => {\n\t if (node) {\n\t const hit = node.value;\n\t if (self[DISPOSE])\n\t self[DISPOSE](hit.key, hit.value);\n\n\t self[LENGTH] -= hit.length;\n\t self[CACHE].delete(hit.key);\n\t self[LRU_LIST].removeNode(node);\n\t }\n\t};\n\n\tclass Entry {\n\t constructor (key, value, length, now, maxAge) {\n\t this.key = key;\n\t this.value = value;\n\t this.length = length;\n\t this.now = now;\n\t this.maxAge = maxAge || 0;\n\t }\n\t}\n\n\tconst forEachStep = (self, fn, node, thisp) => {\n\t let hit = node.value;\n\t if (isStale(self, hit)) {\n\t del(self, node);\n\t if (!self[ALLOW_STALE])\n\t hit = undefined;\n\t }\n\t if (hit)\n\t fn.call(thisp, hit.value, hit.key, self);\n\t};\n\n\tlruCache = LRUCache;\n\treturn lruCache;\n}\n\nvar range;\nvar hasRequiredRange;\n\nfunction requireRange () {\n\tif (hasRequiredRange) return range;\n\thasRequiredRange = 1;\n\t// hoisted class for cyclic dependency\n\tclass Range {\n\t constructor (range, options) {\n\t options = parseOptions(options);\n\n\t if (range instanceof Range) {\n\t if (\n\t range.loose === !!options.loose &&\n\t range.includePrerelease === !!options.includePrerelease\n\t ) {\n\t return range\n\t } else {\n\t return new Range(range.raw, options)\n\t }\n\t }\n\n\t if (range instanceof Comparator) {\n\t // just put it in the set and return\n\t this.raw = range.value;\n\t this.set = [[range]];\n\t this.format();\n\t return this\n\t }\n\n\t this.options = options;\n\t this.loose = !!options.loose;\n\t this.includePrerelease = !!options.includePrerelease;\n\n\t // First, split based on boolean or ||\n\t this.raw = range;\n\t this.set = range\n\t .split('||')\n\t // map the range to a 2d array of comparators\n\t .map(r => this.parseRange(r.trim()))\n\t // throw out any comparator lists that are empty\n\t // this generally means that it was not a valid range, which is allowed\n\t // in loose mode, but will still throw if the WHOLE range is invalid.\n\t .filter(c => c.length);\n\n\t if (!this.set.length) {\n\t throw new TypeError(`Invalid SemVer Range: ${range}`)\n\t }\n\n\t // if we have any that are not the null set, throw out null sets.\n\t if (this.set.length > 1) {\n\t // keep the first one, in case they're all null sets\n\t const first = this.set[0];\n\t this.set = this.set.filter(c => !isNullSet(c[0]));\n\t if (this.set.length === 0) {\n\t this.set = [first];\n\t } else if (this.set.length > 1) {\n\t // if we have any that are *, then the range is just *\n\t for (const c of this.set) {\n\t if (c.length === 1 && isAny(c[0])) {\n\t this.set = [c];\n\t break\n\t }\n\t }\n\t }\n\t }\n\n\t this.format();\n\t }\n\n\t format () {\n\t this.range = this.set\n\t .map((comps) => {\n\t return comps.join(' ').trim()\n\t })\n\t .join('||')\n\t .trim();\n\t return this.range\n\t }\n\n\t toString () {\n\t return this.range\n\t }\n\n\t parseRange (range) {\n\t range = range.trim();\n\n\t // memoize range parsing for performance.\n\t // this is a very hot path, and fully deterministic.\n\t const memoOpts = Object.keys(this.options).join(',');\n\t const memoKey = `parseRange:${memoOpts}:${range}`;\n\t const cached = cache.get(memoKey);\n\t if (cached) {\n\t return cached\n\t }\n\n\t const loose = this.options.loose;\n\t // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n\t const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];\n\t range = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n\t debug('hyphen replace', range);\n\t // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n\t range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);\n\t debug('comparator trim', range);\n\n\t // `~ 1.2.3` => `~1.2.3`\n\t range = range.replace(re[t.TILDETRIM], tildeTrimReplace);\n\n\t // `^ 1.2.3` => `^1.2.3`\n\t range = range.replace(re[t.CARETTRIM], caretTrimReplace);\n\n\t // normalize spaces\n\t range = range.split(/\\s+/).join(' ');\n\n\t // At this point, the range is completely trimmed and\n\t // ready to be split into comparators.\n\n\t let rangeList = range\n\t .split(' ')\n\t .map(comp => parseComparator(comp, this.options))\n\t .join(' ')\n\t .split(/\\s+/)\n\t // >=0.0.0 is equivalent to *\n\t .map(comp => replaceGTE0(comp, this.options));\n\n\t if (loose) {\n\t // in loose mode, throw out any that are not valid comparators\n\t rangeList = rangeList.filter(comp => {\n\t debug('loose invalid filter', comp, this.options);\n\t return !!comp.match(re[t.COMPARATORLOOSE])\n\t });\n\t }\n\t debug('range list', rangeList);\n\n\t // if any comparators are the null set, then replace with JUST null set\n\t // if more than one comparator, remove any * comparators\n\t // also, don't include the same comparator more than once\n\t const rangeMap = new Map();\n\t const comparators = rangeList.map(comp => new Comparator(comp, this.options));\n\t for (const comp of comparators) {\n\t if (isNullSet(comp)) {\n\t return [comp]\n\t }\n\t rangeMap.set(comp.value, comp);\n\t }\n\t if (rangeMap.size > 1 && rangeMap.has('')) {\n\t rangeMap.delete('');\n\t }\n\n\t const result = [...rangeMap.values()];\n\t cache.set(memoKey, result);\n\t return result\n\t }\n\n\t intersects (range, options) {\n\t if (!(range instanceof Range)) {\n\t throw new TypeError('a Range is required')\n\t }\n\n\t return this.set.some((thisComparators) => {\n\t return (\n\t isSatisfiable(thisComparators, options) &&\n\t range.set.some((rangeComparators) => {\n\t return (\n\t isSatisfiable(rangeComparators, options) &&\n\t thisComparators.every((thisComparator) => {\n\t return rangeComparators.every((rangeComparator) => {\n\t return thisComparator.intersects(rangeComparator, options)\n\t })\n\t })\n\t )\n\t })\n\t )\n\t })\n\t }\n\n\t // if ANY of the sets match ALL of its comparators, then pass\n\t test (version) {\n\t if (!version) {\n\t return false\n\t }\n\n\t if (typeof version === 'string') {\n\t try {\n\t version = new SemVer(version, this.options);\n\t } catch (er) {\n\t return false\n\t }\n\t }\n\n\t for (let i = 0; i < this.set.length; i++) {\n\t if (testSet(this.set[i], version, this.options)) {\n\t return true\n\t }\n\t }\n\t return false\n\t }\n\t}\n\trange = Range;\n\n\tconst LRU = requireLruCache();\n\tconst cache = new LRU({ max: 1000 });\n\n\tconst parseOptions = parseOptions_1;\n\tconst Comparator = requireComparator();\n\tconst debug = debug_1;\n\tconst SemVer = semver$2;\n\tconst {\n\t re,\n\t t,\n\t comparatorTrimReplace,\n\t tildeTrimReplace,\n\t caretTrimReplace,\n\t} = re$3.exports;\n\n\tconst isNullSet = c => c.value === '<0.0.0-0';\n\tconst isAny = c => c.value === '';\n\n\t// take a set of comparators and determine whether there\n\t// exists a version which can satisfy it\n\tconst isSatisfiable = (comparators, options) => {\n\t let result = true;\n\t const remainingComparators = comparators.slice();\n\t let testComparator = remainingComparators.pop();\n\n\t while (result && remainingComparators.length) {\n\t result = remainingComparators.every((otherComparator) => {\n\t return testComparator.intersects(otherComparator, options)\n\t });\n\n\t testComparator = remainingComparators.pop();\n\t }\n\n\t return result\n\t};\n\n\t// comprised of xranges, tildes, stars, and gtlt's at this point.\n\t// already replaced the hyphen ranges\n\t// turn into a set of JUST comparators.\n\tconst parseComparator = (comp, options) => {\n\t debug('comp', comp, options);\n\t comp = replaceCarets(comp, options);\n\t debug('caret', comp);\n\t comp = replaceTildes(comp, options);\n\t debug('tildes', comp);\n\t comp = replaceXRanges(comp, options);\n\t debug('xrange', comp);\n\t comp = replaceStars(comp, options);\n\t debug('stars', comp);\n\t return comp\n\t};\n\n\tconst isX = id => !id || id.toLowerCase() === 'x' || id === '*';\n\n\t// ~, ~> --> * (any, kinda silly)\n\t// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n\t// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n\t// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n\t// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n\t// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n\tconst replaceTildes = (comp, options) =>\n\t comp.trim().split(/\\s+/).map((c) => {\n\t return replaceTilde(c, options)\n\t }).join(' ');\n\n\tconst replaceTilde = (comp, options) => {\n\t const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];\n\t return comp.replace(r, (_, M, m, p, pr) => {\n\t debug('tilde', comp, _, M, m, p, pr);\n\t let ret;\n\n\t if (isX(M)) {\n\t ret = '';\n\t } else if (isX(m)) {\n\t ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;\n\t } else if (isX(p)) {\n\t // ~1.2 == >=1.2.0 <1.3.0-0\n\t ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;\n\t } else if (pr) {\n\t debug('replaceTilde pr', pr);\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${M}.${+m + 1}.0-0`;\n\t } else {\n\t // ~1.2.3 == >=1.2.3 <1.3.0-0\n\t ret = `>=${M}.${m}.${p\n\t } <${M}.${+m + 1}.0-0`;\n\t }\n\n\t debug('tilde return', ret);\n\t return ret\n\t })\n\t};\n\n\t// ^ --> * (any, kinda silly)\n\t// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n\t// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n\t// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n\t// ^1.2.3 --> >=1.2.3 <2.0.0-0\n\t// ^1.2.0 --> >=1.2.0 <2.0.0-0\n\tconst replaceCarets = (comp, options) =>\n\t comp.trim().split(/\\s+/).map((c) => {\n\t return replaceCaret(c, options)\n\t }).join(' ');\n\n\tconst replaceCaret = (comp, options) => {\n\t debug('caret', comp, options);\n\t const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];\n\t const z = options.includePrerelease ? '-0' : '';\n\t return comp.replace(r, (_, M, m, p, pr) => {\n\t debug('caret', comp, _, M, m, p, pr);\n\t let ret;\n\n\t if (isX(M)) {\n\t ret = '';\n\t } else if (isX(m)) {\n\t ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;\n\t } else if (isX(p)) {\n\t if (M === '0') {\n\t ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;\n\t } else {\n\t ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;\n\t }\n\t } else if (pr) {\n\t debug('replaceCaret pr', pr);\n\t if (M === '0') {\n\t if (m === '0') {\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${M}.${m}.${+p + 1}-0`;\n\t } else {\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${M}.${+m + 1}.0-0`;\n\t }\n\t } else {\n\t ret = `>=${M}.${m}.${p}-${pr\n\t } <${+M + 1}.0.0-0`;\n\t }\n\t } else {\n\t debug('no pr');\n\t if (M === '0') {\n\t if (m === '0') {\n\t ret = `>=${M}.${m}.${p\n\t }${z} <${M}.${m}.${+p + 1}-0`;\n\t } else {\n\t ret = `>=${M}.${m}.${p\n\t }${z} <${M}.${+m + 1}.0-0`;\n\t }\n\t } else {\n\t ret = `>=${M}.${m}.${p\n\t } <${+M + 1}.0.0-0`;\n\t }\n\t }\n\n\t debug('caret return', ret);\n\t return ret\n\t })\n\t};\n\n\tconst replaceXRanges = (comp, options) => {\n\t debug('replaceXRanges', comp, options);\n\t return comp.split(/\\s+/).map((c) => {\n\t return replaceXRange(c, options)\n\t }).join(' ')\n\t};\n\n\tconst replaceXRange = (comp, options) => {\n\t comp = comp.trim();\n\t const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];\n\t return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n\t debug('xRange', comp, ret, gtlt, M, m, p, pr);\n\t const xM = isX(M);\n\t const xm = xM || isX(m);\n\t const xp = xm || isX(p);\n\t const anyX = xp;\n\n\t if (gtlt === '=' && anyX) {\n\t gtlt = '';\n\t }\n\n\t // if we're including prereleases in the match, then we need\n\t // to fix this to -0, the lowest possible prerelease value\n\t pr = options.includePrerelease ? '-0' : '';\n\n\t if (xM) {\n\t if (gtlt === '>' || gtlt === '<') {\n\t // nothing is allowed\n\t ret = '<0.0.0-0';\n\t } else {\n\t // nothing is forbidden\n\t ret = '*';\n\t }\n\t } else if (gtlt && anyX) {\n\t // we know patch is an x, because we have any x at all.\n\t // replace X with 0\n\t if (xm) {\n\t m = 0;\n\t }\n\t p = 0;\n\n\t if (gtlt === '>') {\n\t // >1 => >=2.0.0\n\t // >1.2 => >=1.3.0\n\t gtlt = '>=';\n\t if (xm) {\n\t M = +M + 1;\n\t m = 0;\n\t p = 0;\n\t } else {\n\t m = +m + 1;\n\t p = 0;\n\t }\n\t } else if (gtlt === '<=') {\n\t // <=0.7.x is actually <0.8.0, since any 0.7.x should\n\t // pass. Similarly, <=7.x is actually <8.0.0, etc.\n\t gtlt = '<';\n\t if (xm) {\n\t M = +M + 1;\n\t } else {\n\t m = +m + 1;\n\t }\n\t }\n\n\t if (gtlt === '<') {\n\t pr = '-0';\n\t }\n\n\t ret = `${gtlt + M}.${m}.${p}${pr}`;\n\t } else if (xm) {\n\t ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;\n\t } else if (xp) {\n\t ret = `>=${M}.${m}.0${pr\n\t } <${M}.${+m + 1}.0-0`;\n\t }\n\n\t debug('xRange return', ret);\n\n\t return ret\n\t })\n\t};\n\n\t// Because * is AND-ed with everything else in the comparator,\n\t// and '' means \"any version\", just remove the *s entirely.\n\tconst replaceStars = (comp, options) => {\n\t debug('replaceStars', comp, options);\n\t // Looseness is ignored here. star is always as loose as it gets!\n\t return comp.trim().replace(re[t.STAR], '')\n\t};\n\n\tconst replaceGTE0 = (comp, options) => {\n\t debug('replaceGTE0', comp, options);\n\t return comp.trim()\n\t .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n\t};\n\n\t// This function is passed to string.replace(re[t.HYPHENRANGE])\n\t// M, m, patch, prerelease, build\n\t// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n\t// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n\t// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n\tconst hyphenReplace = incPr => ($0,\n\t from, fM, fm, fp, fpr, fb,\n\t to, tM, tm, tp, tpr, tb) => {\n\t if (isX(fM)) {\n\t from = '';\n\t } else if (isX(fm)) {\n\t from = `>=${fM}.0.0${incPr ? '-0' : ''}`;\n\t } else if (isX(fp)) {\n\t from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`;\n\t } else if (fpr) {\n\t from = `>=${from}`;\n\t } else {\n\t from = `>=${from}${incPr ? '-0' : ''}`;\n\t }\n\n\t if (isX(tM)) {\n\t to = '';\n\t } else if (isX(tm)) {\n\t to = `<${+tM + 1}.0.0-0`;\n\t } else if (isX(tp)) {\n\t to = `<${tM}.${+tm + 1}.0-0`;\n\t } else if (tpr) {\n\t to = `<=${tM}.${tm}.${tp}-${tpr}`;\n\t } else if (incPr) {\n\t to = `<${tM}.${tm}.${+tp + 1}-0`;\n\t } else {\n\t to = `<=${to}`;\n\t }\n\n\t return (`${from} ${to}`).trim()\n\t};\n\n\tconst testSet = (set, version, options) => {\n\t for (let i = 0; i < set.length; i++) {\n\t if (!set[i].test(version)) {\n\t return false\n\t }\n\t }\n\n\t if (version.prerelease.length && !options.includePrerelease) {\n\t // Find the set of versions that are allowed to have prereleases\n\t // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n\t // That should allow `1.2.3-pr.2` to pass.\n\t // However, `1.2.4-alpha.notready` should NOT be allowed,\n\t // even though it's within the range set by the comparators.\n\t for (let i = 0; i < set.length; i++) {\n\t debug(set[i].semver);\n\t if (set[i].semver === Comparator.ANY) {\n\t continue\n\t }\n\n\t if (set[i].semver.prerelease.length > 0) {\n\t const allowed = set[i].semver;\n\t if (allowed.major === version.major &&\n\t allowed.minor === version.minor &&\n\t allowed.patch === version.patch) {\n\t return true\n\t }\n\t }\n\t }\n\n\t // Version has a -pre, but it's not one of the ones we like.\n\t return false\n\t }\n\n\t return true\n\t};\n\treturn range;\n}\n\nvar comparator;\nvar hasRequiredComparator;\n\nfunction requireComparator () {\n\tif (hasRequiredComparator) return comparator;\n\thasRequiredComparator = 1;\n\tconst ANY = Symbol('SemVer ANY');\n\t// hoisted class for cyclic dependency\n\tclass Comparator {\n\t static get ANY () {\n\t return ANY\n\t }\n\n\t constructor (comp, options) {\n\t options = parseOptions(options);\n\n\t if (comp instanceof Comparator) {\n\t if (comp.loose === !!options.loose) {\n\t return comp\n\t } else {\n\t comp = comp.value;\n\t }\n\t }\n\n\t debug('comparator', comp, options);\n\t this.options = options;\n\t this.loose = !!options.loose;\n\t this.parse(comp);\n\n\t if (this.semver === ANY) {\n\t this.value = '';\n\t } else {\n\t this.value = this.operator + this.semver.version;\n\t }\n\n\t debug('comp', this);\n\t }\n\n\t parse (comp) {\n\t const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];\n\t const m = comp.match(r);\n\n\t if (!m) {\n\t throw new TypeError(`Invalid comparator: ${comp}`)\n\t }\n\n\t this.operator = m[1] !== undefined ? m[1] : '';\n\t if (this.operator === '=') {\n\t this.operator = '';\n\t }\n\n\t // if it literally is just '>' or '' then allow anything.\n\t if (!m[2]) {\n\t this.semver = ANY;\n\t } else {\n\t this.semver = new SemVer(m[2], this.options.loose);\n\t }\n\t }\n\n\t toString () {\n\t return this.value\n\t }\n\n\t test (version) {\n\t debug('Comparator.test', version, this.options.loose);\n\n\t if (this.semver === ANY || version === ANY) {\n\t return true\n\t }\n\n\t if (typeof version === 'string') {\n\t try {\n\t version = new SemVer(version, this.options);\n\t } catch (er) {\n\t return false\n\t }\n\t }\n\n\t return cmp(version, this.operator, this.semver, this.options)\n\t }\n\n\t intersects (comp, options) {\n\t if (!(comp instanceof Comparator)) {\n\t throw new TypeError('a Comparator is required')\n\t }\n\n\t if (!options || typeof options !== 'object') {\n\t options = {\n\t loose: !!options,\n\t includePrerelease: false,\n\t };\n\t }\n\n\t if (this.operator === '') {\n\t if (this.value === '') {\n\t return true\n\t }\n\t return new Range(comp.value, options).test(this.value)\n\t } else if (comp.operator === '') {\n\t if (comp.value === '') {\n\t return true\n\t }\n\t return new Range(this.value, options).test(comp.semver)\n\t }\n\n\t const sameDirectionIncreasing =\n\t (this.operator === '>=' || this.operator === '>') &&\n\t (comp.operator === '>=' || comp.operator === '>');\n\t const sameDirectionDecreasing =\n\t (this.operator === '<=' || this.operator === '<') &&\n\t (comp.operator === '<=' || comp.operator === '<');\n\t const sameSemVer = this.semver.version === comp.semver.version;\n\t const differentDirectionsInclusive =\n\t (this.operator === '>=' || this.operator === '<=') &&\n\t (comp.operator === '>=' || comp.operator === '<=');\n\t const oppositeDirectionsLessThan =\n\t cmp(this.semver, '<', comp.semver, options) &&\n\t (this.operator === '>=' || this.operator === '>') &&\n\t (comp.operator === '<=' || comp.operator === '<');\n\t const oppositeDirectionsGreaterThan =\n\t cmp(this.semver, '>', comp.semver, options) &&\n\t (this.operator === '<=' || this.operator === '<') &&\n\t (comp.operator === '>=' || comp.operator === '>');\n\n\t return (\n\t sameDirectionIncreasing ||\n\t sameDirectionDecreasing ||\n\t (sameSemVer && differentDirectionsInclusive) ||\n\t oppositeDirectionsLessThan ||\n\t oppositeDirectionsGreaterThan\n\t )\n\t }\n\t}\n\n\tcomparator = Comparator;\n\n\tconst parseOptions = parseOptions_1;\n\tconst { re, t } = re$3.exports;\n\tconst cmp = cmp_1;\n\tconst debug = debug_1;\n\tconst SemVer = semver$2;\n\tconst Range = requireRange();\n\treturn comparator;\n}\n\nconst Range$8 = requireRange();\nconst satisfies$3 = (version, range, options) => {\n try {\n range = new Range$8(range, options);\n } catch (er) {\n return false\n }\n return range.test(version)\n};\nvar satisfies_1 = satisfies$3;\n\nconst Range$7 = requireRange();\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range$7(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '));\n\nvar toComparators_1 = toComparators;\n\nconst SemVer$3 = semver$2;\nconst Range$6 = requireRange();\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null;\n let maxSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range$6(range, options);\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v;\n maxSV = new SemVer$3(max, options);\n }\n }\n });\n return max\n};\nvar maxSatisfying_1 = maxSatisfying;\n\nconst SemVer$2 = semver$2;\nconst Range$5 = requireRange();\nconst minSatisfying = (versions, range, options) => {\n let min = null;\n let minSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range$5(range, options);\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v;\n minSV = new SemVer$2(min, options);\n }\n }\n });\n return min\n};\nvar minSatisfying_1 = minSatisfying;\n\nconst SemVer$1 = semver$2;\nconst Range$4 = requireRange();\nconst gt$1 = gt_1;\n\nconst minVersion = (range, loose) => {\n range = new Range$4(range, loose);\n\n let minver = new SemVer$1('0.0.0');\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer$1('0.0.0-0');\n if (range.test(minver)) {\n return minver\n }\n\n minver = null;\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i];\n\n let setMin = null;\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer$1(comparator.semver.version);\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++;\n } else {\n compver.prerelease.push(0);\n }\n compver.raw = compver.format();\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt$1(compver, setMin)) {\n setMin = compver;\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n });\n if (setMin && (!minver || gt$1(minver, setMin))) {\n minver = setMin;\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n};\nvar minVersion_1 = minVersion;\n\nconst Range$3 = requireRange();\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range$3(range, options).range || '*'\n } catch (er) {\n return null\n }\n};\nvar valid = validRange;\n\nconst SemVer = semver$2;\nconst Comparator$1 = requireComparator();\nconst { ANY: ANY$1 } = Comparator$1;\nconst Range$2 = requireRange();\nconst satisfies$2 = satisfies_1;\nconst gt = gt_1;\nconst lt = lt_1;\nconst lte = lte_1;\nconst gte = gte_1;\n\nconst outside$2 = (version, range, hilo, options) => {\n version = new SemVer(version, options);\n range = new Range$2(range, options);\n\n let gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case '>':\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = '>';\n ecomp = '>=';\n break\n case '<':\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = '<';\n ecomp = '<=';\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies$2(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i];\n\n let high = null;\n let low = null;\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY$1) {\n comparator = new Comparator$1('>=0.0.0');\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator;\n }\n });\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n};\n\nvar outside_1 = outside$2;\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside$1 = outside_1;\nconst gtr = (version, range, options) => outside$1(version, range, '>', options);\nvar gtr_1 = gtr;\n\nconst outside = outside_1;\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options);\nvar ltr_1 = ltr;\n\nconst Range$1 = requireRange();\nconst intersects = (r1, r2, options) => {\n r1 = new Range$1(r1, options);\n r2 = new Range$1(r2, options);\n return r1.intersects(r2)\n};\nvar intersects_1 = intersects;\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies$1 = satisfies_1;\nconst compare$1 = compare_1;\nvar simplify = (versions, range, options) => {\n const set = [];\n let first = null;\n let prev = null;\n const v = versions.sort((a, b) => compare$1(a, b, options));\n for (const version of v) {\n const included = satisfies$1(version, range, options);\n if (included) {\n prev = version;\n if (!first) {\n first = version;\n }\n } else {\n if (prev) {\n set.push([first, prev]);\n }\n prev = null;\n first = null;\n }\n }\n if (first) {\n set.push([first, null]);\n }\n\n const ranges = [];\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min);\n } else if (!max && min === v[0]) {\n ranges.push('*');\n } else if (!max) {\n ranges.push(`>=${min}`);\n } else if (min === v[0]) {\n ranges.push(`<=${max}`);\n } else {\n ranges.push(`${min} - ${max}`);\n }\n }\n const simplified = ranges.join(' || ');\n const original = typeof range.raw === 'string' ? range.raw : String(range);\n return simplified.length < original.length ? simplified : range\n};\n\nconst Range = requireRange();\nconst Comparator = requireComparator();\nconst { ANY } = Comparator;\nconst satisfies = satisfies_1;\nconst compare = compare_1;\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options);\n dom = new Range(dom, options);\n let sawNonNull = false;\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options);\n sawNonNull = sawNonNull || isSub !== null;\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n};\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = [new Comparator('>=0.0.0-0')];\n } else {\n sub = [new Comparator('>=0.0.0')];\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = [new Comparator('>=0.0.0')];\n }\n }\n\n const eqSet = new Set();\n let gt, lt;\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options);\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options);\n } else {\n eqSet.add(c.semver);\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp;\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options);\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower;\n let hasDomLT, hasDomGT;\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false;\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false;\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false;\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=';\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=';\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false;\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options);\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false;\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options);\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n};\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options);\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n};\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options);\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n};\n\nvar subset_1 = subset;\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = re$3.exports;\nvar semver$1 = {\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n SemVer: semver$2,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n parse: parse_1,\n valid: valid_1,\n clean: clean_1,\n inc: inc_1,\n diff: diff_1,\n major: major_1,\n minor: minor_1,\n patch: patch_1,\n prerelease: prerelease_1,\n compare: compare_1,\n rcompare: rcompare_1,\n compareLoose: compareLoose_1,\n compareBuild: compareBuild_1,\n sort: sort_1,\n rsort: rsort_1,\n gt: gt_1,\n lt: lt_1,\n eq: eq_1,\n neq: neq_1,\n gte: gte_1,\n lte: lte_1,\n cmp: cmp_1,\n coerce: coerce_1,\n Comparator: requireComparator(),\n Range: requireRange(),\n satisfies: satisfies_1,\n toComparators: toComparators_1,\n maxSatisfying: maxSatisfying_1,\n minSatisfying: minSatisfying_1,\n minVersion: minVersion_1,\n validRange: valid,\n outside: outside_1,\n gtr: gtr_1,\n ltr: ltr_1,\n intersects: intersects_1,\n simplifyRange: simplify,\n subset: subset_1,\n};\n\nvar semver = semver$1;\n\nvar builtins = function ({\n version = process.version,\n experimental = false\n} = {}) {\n var coreModules = [\n 'assert',\n 'buffer',\n 'child_process',\n 'cluster',\n 'console',\n 'constants',\n 'crypto',\n 'dgram',\n 'dns',\n 'domain',\n 'events',\n 'fs',\n 'http',\n 'https',\n 'module',\n 'net',\n 'os',\n 'path',\n 'punycode',\n 'querystring',\n 'readline',\n 'repl',\n 'stream',\n 'string_decoder',\n 'sys',\n 'timers',\n 'tls',\n 'tty',\n 'url',\n 'util',\n 'vm',\n 'zlib'\n ];\n\n if (semver.lt(version, '6.0.0')) coreModules.push('freelist');\n if (semver.gte(version, '1.0.0')) coreModules.push('v8');\n if (semver.gte(version, '1.1.0')) coreModules.push('process');\n if (semver.gte(version, '8.0.0')) coreModules.push('inspector');\n if (semver.gte(version, '8.1.0')) coreModules.push('async_hooks');\n if (semver.gte(version, '8.4.0')) coreModules.push('http2');\n if (semver.gte(version, '8.5.0')) coreModules.push('perf_hooks');\n if (semver.gte(version, '10.0.0')) coreModules.push('trace_events');\n\n if (\n semver.gte(version, '10.5.0') &&\n (experimental || semver.gte(version, '12.0.0'))\n ) {\n coreModules.push('worker_threads');\n }\n if (semver.gte(version, '12.16.0') && experimental) {\n coreModules.push('wasi');\n }\n \n return coreModules\n};\n\n// Manually “tree shaken” from:\n\nconst reader = {read};\n\n/**\n * @param {string} jsonPath\n * @returns {{string: string}}\n */\nfunction read(jsonPath) {\n return find(path.dirname(jsonPath))\n}\n\n/**\n * @param {string} dir\n * @returns {{string: string}}\n */\nfunction find(dir) {\n try {\n const string = fs.readFileSync(\n path.toNamespacedPath(path.join(dir, 'package.json')),\n 'utf8'\n );\n return {string}\n } catch (error) {\n if (error.code === 'ENOENT') {\n const parent = path.dirname(dir);\n if (dir !== parent) return find(parent)\n return {string: undefined}\n // Throw all other errors.\n /* c8 ignore next 4 */\n }\n\n throw error\n }\n}\n\n// Manually “tree shaken” from:\n\nconst isWindows = process.platform === 'win32';\n\nconst own$1 = {}.hasOwnProperty;\n\nconst codes = {};\n\n/**\n * @typedef {(...args: unknown[]) => string} MessageFunction\n */\n\n/** @type {Map} */\nconst messages = new Map();\nconst nodeInternalPrefix = '__node_internal_';\n/** @type {number} */\nlet userStackTraceLimit;\n\ncodes.ERR_INVALID_MODULE_SPECIFIER = createError(\n 'ERR_INVALID_MODULE_SPECIFIER',\n /**\n * @param {string} request\n * @param {string} reason\n * @param {string} [base]\n */\n (request, reason, base = undefined) => {\n return `Invalid module \"${request}\" ${reason}${\n base ? ` imported from ${base}` : ''\n }`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_PACKAGE_CONFIG = createError(\n 'ERR_INVALID_PACKAGE_CONFIG',\n /**\n * @param {string} path\n * @param {string} [base]\n * @param {string} [message]\n */\n (path, base, message) => {\n return `Invalid package config ${path}${\n base ? ` while importing ${base}` : ''\n }${message ? `. ${message}` : ''}`\n },\n Error\n);\n\ncodes.ERR_INVALID_PACKAGE_TARGET = createError(\n 'ERR_INVALID_PACKAGE_TARGET',\n /**\n * @param {string} pkgPath\n * @param {string} key\n * @param {unknown} target\n * @param {boolean} [isImport=false]\n * @param {string} [base]\n */\n (pkgPath, key, target, isImport = false, base = undefined) => {\n const relError =\n typeof target === 'string' &&\n !isImport &&\n target.length > 0 &&\n !target.startsWith('./');\n if (key === '.') {\n assert(isImport === false);\n return (\n `Invalid \"exports\" main target ${JSON.stringify(target)} defined ` +\n `in the package config ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }${relError ? '; targets must start with \"./\"' : ''}`\n )\n }\n\n return `Invalid \"${\n isImport ? 'imports' : 'exports'\n }\" target ${JSON.stringify(\n target\n )} defined for '${key}' in the package config ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }${relError ? '; targets must start with \"./\"' : ''}`\n },\n Error\n);\n\ncodes.ERR_MODULE_NOT_FOUND = createError(\n 'ERR_MODULE_NOT_FOUND',\n /**\n * @param {string} path\n * @param {string} base\n * @param {string} [type]\n */\n (path, base, type = 'package') => {\n return `Cannot find ${type} '${path}' imported from ${base}`\n },\n Error\n);\n\ncodes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\n 'ERR_PACKAGE_IMPORT_NOT_DEFINED',\n /**\n * @param {string} specifier\n * @param {string} packagePath\n * @param {string} base\n */\n (specifier, packagePath, base) => {\n return `Package import specifier \"${specifier}\" is not defined${\n packagePath ? ` in package ${packagePath}package.json` : ''\n } imported from ${base}`\n },\n TypeError\n);\n\ncodes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\n 'ERR_PACKAGE_PATH_NOT_EXPORTED',\n /**\n * @param {string} pkgPath\n * @param {string} subpath\n * @param {string} [base]\n */\n (pkgPath, subpath, base = undefined) => {\n if (subpath === '.')\n return `No \"exports\" main defined in ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n return `Package subpath '${subpath}' is not defined by \"exports\" in ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n },\n Error\n);\n\ncodes.ERR_UNSUPPORTED_DIR_IMPORT = createError(\n 'ERR_UNSUPPORTED_DIR_IMPORT',\n \"Directory import '%s' is not supported \" +\n 'resolving ES modules imported from %s',\n Error\n);\n\ncodes.ERR_UNKNOWN_FILE_EXTENSION = createError(\n 'ERR_UNKNOWN_FILE_EXTENSION',\n 'Unknown file extension \"%s\" for %s',\n TypeError\n);\n\ncodes.ERR_INVALID_ARG_VALUE = createError(\n 'ERR_INVALID_ARG_VALUE',\n /**\n * @param {string} name\n * @param {unknown} value\n * @param {string} [reason='is invalid']\n */\n (name, value, reason = 'is invalid') => {\n let inspected = inspect(value);\n\n if (inspected.length > 128) {\n inspected = `${inspected.slice(0, 128)}...`;\n }\n\n const type = name.includes('.') ? 'property' : 'argument';\n\n return `The ${type} '${name}' ${reason}. Received ${inspected}`\n },\n TypeError\n // Note: extra classes have been shaken out.\n // , RangeError\n);\n\ncodes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(\n 'ERR_UNSUPPORTED_ESM_URL_SCHEME',\n /**\n * @param {URL} url\n */\n (url) => {\n let message =\n 'Only file and data URLs are supported by the default ESM loader';\n\n if (isWindows && url.protocol.length === 2) {\n message += '. On Windows, absolute paths must be valid file:// URLs';\n }\n\n message += `. Received protocol '${url.protocol}'`;\n return message\n },\n Error\n);\n\n/**\n * Utility function for registering the error codes. Only used here. Exported\n * *only* to allow for testing.\n * @param {string} sym\n * @param {MessageFunction|string} value\n * @param {ErrorConstructor} def\n * @returns {new (...args: unknown[]) => Error}\n */\nfunction createError(sym, value, def) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, value);\n\n return makeNodeErrorWithCode(def, sym)\n}\n\n/**\n * @param {ErrorConstructor} Base\n * @param {string} key\n * @returns {ErrorConstructor}\n */\nfunction makeNodeErrorWithCode(Base, key) {\n // @ts-expect-error It’s a Node error.\n return NodeError\n /**\n * @param {unknown[]} args\n */\n function NodeError(...args) {\n const limit = Error.stackTraceLimit;\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;\n const error = new Base();\n // Reset the limit and setting the name property.\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;\n const message = getMessage(key, args, error);\n Object.defineProperty(error, 'message', {\n value: message,\n enumerable: false,\n writable: true,\n configurable: true\n });\n Object.defineProperty(error, 'toString', {\n /** @this {Error} */\n value() {\n return `${this.name} [${key}]: ${this.message}`\n },\n enumerable: false,\n writable: true,\n configurable: true\n });\n addCodeToName(error, Base.name, key);\n // @ts-expect-error It’s a Node error.\n error.code = key;\n return error\n }\n}\n\nconst addCodeToName = hideStackFrames(\n /**\n * @param {Error} error\n * @param {string} name\n * @param {string} code\n * @returns {void}\n */\n function (error, name, code) {\n // Set the stack\n error = captureLargerStackTrace(error);\n // Add the error code to the name to include it in the stack trace.\n error.name = `${name} [${code}]`;\n // Access the stack to generate the error message including the error code\n // from the name.\n error.stack; // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n if (name === 'SystemError') {\n Object.defineProperty(error, 'name', {\n value: name,\n enumerable: false,\n writable: true,\n configurable: true\n });\n } else {\n delete error.name;\n }\n }\n);\n\n/**\n * @returns {boolean}\n */\nfunction isErrorStackTraceLimitWritable() {\n const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');\n if (desc === undefined) {\n return Object.isExtensible(Error)\n }\n\n return own$1.call(desc, 'writable') ? desc.writable : desc.set !== undefined\n}\n\n/**\n * This function removes unnecessary frames from Node.js core errors.\n * @template {(...args: unknown[]) => unknown} T\n * @type {(fn: T) => T}\n */\nfunction hideStackFrames(fn) {\n // We rename the functions that will be hidden to cut off the stacktrace\n // at the outermost one\n const hidden = nodeInternalPrefix + fn.name;\n Object.defineProperty(fn, 'name', {value: hidden});\n return fn\n}\n\nconst captureLargerStackTrace = hideStackFrames(\n /**\n * @param {Error} error\n * @returns {Error}\n */\n function (error) {\n const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();\n if (stackTraceLimitIsWritable) {\n userStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = Number.POSITIVE_INFINITY;\n }\n\n Error.captureStackTrace(error);\n\n // Reset the limit\n if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;\n\n return error\n }\n);\n\n/**\n * @param {string} key\n * @param {unknown[]} args\n * @param {Error} self\n * @returns {string}\n */\nfunction getMessage(key, args, self) {\n const message = messages.get(key);\n\n if (typeof message === 'function') {\n assert(\n message.length <= args.length, // Default options do not count.\n `Code: ${key}; The provided arguments length (${args.length}) does not ` +\n `match the required ones (${message.length}).`\n );\n return Reflect.apply(message, self, args)\n }\n\n const expectedLength = (message.match(/%[dfijoOs]/g) || []).length;\n assert(\n expectedLength === args.length,\n `Code: ${key}; The provided arguments length (${args.length}) does not ` +\n `match the required ones (${expectedLength}).`\n );\n if (args.length === 0) return message\n\n args.unshift(message);\n return Reflect.apply(format, null, args)\n}\n\n// Manually “tree shaken” from:\n\nconst {ERR_UNKNOWN_FILE_EXTENSION} = codes;\n\nconst extensionFormatMap = {\n __proto__: null,\n '.cjs': 'commonjs',\n '.js': 'module',\n '.mjs': 'module'\n};\n\n/**\n * @param {string} url\n * @returns {{format: string|null}}\n */\nfunction defaultGetFormat(url) {\n if (url.startsWith('node:')) {\n return {format: 'builtin'}\n }\n\n const parsed = new URL(url);\n\n if (parsed.protocol === 'data:') {\n const {1: mime} = /^([^/]+\\/[^;,]+)[^,]*?(;base64)?,/.exec(\n parsed.pathname\n ) || [null, null];\n const format = mime === 'text/javascript' ? 'module' : null;\n return {format}\n }\n\n if (parsed.protocol === 'file:') {\n const ext = path.extname(parsed.pathname);\n /** @type {string} */\n let format;\n if (ext === '.js') {\n format = getPackageType(parsed.href) === 'module' ? 'module' : 'commonjs';\n } else {\n format = extensionFormatMap[ext];\n }\n\n if (!format) {\n throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url))\n }\n\n return {format: format || null}\n }\n\n return {format: null}\n}\n\n// Manually “tree shaken” from:\n\nconst listOfBuiltins = builtins();\n\nconst {\n ERR_INVALID_MODULE_SPECIFIER,\n ERR_INVALID_PACKAGE_CONFIG,\n ERR_INVALID_PACKAGE_TARGET,\n ERR_MODULE_NOT_FOUND,\n ERR_PACKAGE_IMPORT_NOT_DEFINED,\n ERR_PACKAGE_PATH_NOT_EXPORTED,\n ERR_UNSUPPORTED_DIR_IMPORT,\n ERR_UNSUPPORTED_ESM_URL_SCHEME,\n ERR_INVALID_ARG_VALUE\n} = codes;\n\nconst own = {}.hasOwnProperty;\n\nconst DEFAULT_CONDITIONS = Object.freeze(['node', 'import']);\nconst DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);\n\nconst invalidSegmentRegEx = /(^|\\\\|\\/)(\\.\\.?|node_modules)(\\\\|\\/|$)/;\nconst patternRegEx = /\\*/g;\nconst encodedSepRegEx = /%2f|%2c/i;\n/** @type {Set} */\nconst emittedPackageWarnings = new Set();\n/** @type {Map} */\nconst packageJsonCache = new Map();\n\n/**\n * @param {string} match\n * @param {URL} pjsonUrl\n * @param {boolean} isExports\n * @param {URL} base\n * @returns {void}\n */\nfunction emitFolderMapDeprecation(match, pjsonUrl, isExports, base) {\n const pjsonPath = fileURLToPath(pjsonUrl);\n\n if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return\n emittedPackageWarnings.add(pjsonPath + '|' + match);\n process.emitWarning(\n `Use of deprecated folder mapping \"${match}\" in the ${\n isExports ? '\"exports\"' : '\"imports\"'\n } field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath(base)}` : ''\n }.\\n` +\n `Update this package.json to use a subpath pattern like \"${match}*\".`,\n 'DeprecationWarning',\n 'DEP0148'\n );\n}\n\n/**\n * @param {URL} url\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {unknown} [main]\n * @returns {void}\n */\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n const {format} = defaultGetFormat(url.href);\n if (format !== 'module') return\n const path = fileURLToPath(url.href);\n const pkgPath = fileURLToPath(new URL('.', packageJsonUrl));\n const basePath = fileURLToPath(base);\n if (main)\n process.emitWarning(\n `Package ${pkgPath} has a \"main\" field set to ${JSON.stringify(main)}, ` +\n `excluding the full filename and extension to the resolved file at \"${path.slice(\n pkgPath.length\n )}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is` +\n 'deprecated for ES modules.',\n 'DeprecationWarning',\n 'DEP0151'\n );\n else\n process.emitWarning(\n `No \"main\" or \"exports\" field defined in the package.json for ${pkgPath} resolving the main entry point \"${path.slice(\n pkgPath.length\n )}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`,\n 'DeprecationWarning',\n 'DEP0151'\n );\n}\n\n/**\n * @param {string[]} [conditions]\n * @returns {Set}\n */\nfunction getConditionsSet(conditions) {\n if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) {\n if (!Array.isArray(conditions)) {\n throw new ERR_INVALID_ARG_VALUE(\n 'conditions',\n conditions,\n 'expected an array'\n )\n }\n\n return new Set(conditions)\n }\n\n return DEFAULT_CONDITIONS_SET\n}\n\n/**\n * @param {string} path\n * @returns {Stats}\n */\nfunction tryStatSync(path) {\n // Note: from Node 15 onwards we can use `throwIfNoEntry: false` instead.\n try {\n return statSync(path)\n } catch {\n return new Stats()\n }\n}\n\n/**\n * @param {string} path\n * @param {string|URL} specifier Note: `specifier` is actually optional, not base.\n * @param {URL} [base]\n * @returns {PackageConfig}\n */\nfunction getPackageConfig(path, specifier, base) {\n const existing = packageJsonCache.get(path);\n if (existing !== undefined) {\n return existing\n }\n\n const source = reader.read(path).string;\n\n if (source === undefined) {\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: path,\n exists: false,\n main: undefined,\n name: undefined,\n type: 'none',\n exports: undefined,\n imports: undefined\n };\n packageJsonCache.set(path, packageConfig);\n return packageConfig\n }\n\n /** @type {Object.} */\n let packageJson;\n try {\n packageJson = JSON.parse(source);\n } catch (error) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n path,\n (base ? `\"${specifier}\" from ` : '') + fileURLToPath(base || specifier),\n error.message\n )\n }\n\n const {exports, imports, main, name, type} = packageJson;\n\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: path,\n exists: true,\n main: typeof main === 'string' ? main : undefined,\n name: typeof name === 'string' ? name : undefined,\n type: type === 'module' || type === 'commonjs' ? type : 'none',\n // @ts-expect-error Assume `Object.`.\n exports,\n // @ts-expect-error Assume `Object.`.\n imports: imports && typeof imports === 'object' ? imports : undefined\n };\n packageJsonCache.set(path, packageConfig);\n return packageConfig\n}\n\n/**\n * @param {URL|string} resolved\n * @returns {PackageConfig}\n */\nfunction getPackageScopeConfig(resolved) {\n let packageJsonUrl = new URL('./package.json', resolved);\n\n while (true) {\n const packageJsonPath = packageJsonUrl.pathname;\n\n if (packageJsonPath.endsWith('node_modules/package.json')) break\n\n const packageConfig = getPackageConfig(\n fileURLToPath(packageJsonUrl),\n resolved\n );\n if (packageConfig.exists) return packageConfig\n\n const lastPackageJsonUrl = packageJsonUrl;\n packageJsonUrl = new URL('../package.json', packageJsonUrl);\n\n // Terminates at root where ../package.json equals ../../package.json\n // (can't just check \"/package.json\" for Windows support).\n if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) break\n }\n\n const packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: packageJsonPath,\n exists: false,\n main: undefined,\n name: undefined,\n type: 'none',\n exports: undefined,\n imports: undefined\n };\n packageJsonCache.set(packageJsonPath, packageConfig);\n return packageConfig\n}\n\n/**\n * Legacy CommonJS main resolution:\n * 1. let M = pkg_url + (json main field)\n * 2. TRY(M, M.js, M.json, M.node)\n * 3. TRY(M/index.js, M/index.json, M/index.node)\n * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)\n * 5. NOT_FOUND\n *\n * @param {URL} url\n * @returns {boolean}\n */\nfunction fileExists(url) {\n return tryStatSync(fileURLToPath(url)).isFile()\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {PackageConfig} packageConfig\n * @param {URL} base\n * @returns {URL}\n */\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n /** @type {URL} */\n let guess;\n if (packageConfig.main !== undefined) {\n guess = new URL(`./${packageConfig.main}`, packageJsonUrl);\n // Note: fs check redundances will be handled by Descriptor cache here.\n if (fileExists(guess)) return guess\n\n const tries = [\n `./${packageConfig.main}.js`,\n `./${packageConfig.main}.json`,\n `./${packageConfig.main}.node`,\n `./${packageConfig.main}/index.js`,\n `./${packageConfig.main}/index.json`,\n `./${packageConfig.main}/index.node`\n ];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(\n guess,\n packageJsonUrl,\n base,\n packageConfig.main\n );\n return guess\n }\n // Fallthrough.\n }\n\n const tries = ['./index.js', './index.json', './index.node'];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n return guess\n }\n\n // Not found.\n throw new ERR_MODULE_NOT_FOUND(\n fileURLToPath(new URL('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {URL} resolved\n * @param {URL} base\n * @returns {URL}\n */\nfunction finalizeResolution(resolved, base) {\n if (encodedSepRegEx.test(resolved.pathname))\n throw new ERR_INVALID_MODULE_SPECIFIER(\n resolved.pathname,\n 'must not include encoded \"/\" or \"\\\\\" characters',\n fileURLToPath(base)\n )\n\n const path = fileURLToPath(resolved);\n\n const stats = tryStatSync(path.endsWith('/') ? path.slice(-1) : path);\n\n if (stats.isDirectory()) {\n const error = new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base));\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n if (!stats.isFile()) {\n throw new ERR_MODULE_NOT_FOUND(\n path || resolved.pathname,\n base && fileURLToPath(base),\n 'module'\n )\n }\n\n return resolved\n}\n\n/**\n * @param {string} specifier\n * @param {URL?} packageJsonUrl\n * @param {URL} base\n * @returns {never}\n */\nfunction throwImportNotDefined(specifier, packageJsonUrl, base) {\n throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(\n specifier,\n packageJsonUrl && fileURLToPath(new URL('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {never}\n */\nfunction throwExportsNotFound(subpath, packageJsonUrl, base) {\n throw new ERR_PACKAGE_PATH_NOT_EXPORTED(\n fileURLToPath(new URL('.', packageJsonUrl)),\n subpath,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidSubpath(subpath, packageJsonUrl, internal, base) {\n const reason = `request is not a valid subpath for the \"${\n internal ? 'imports' : 'exports'\n }\" resolution of ${fileURLToPath(packageJsonUrl)}`;\n\n throw new ERR_INVALID_MODULE_SPECIFIER(\n subpath,\n reason,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {unknown} target\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidPackageTarget(\n subpath,\n target,\n packageJsonUrl,\n internal,\n base\n) {\n target =\n typeof target === 'object' && target !== null\n ? JSON.stringify(target, null, '')\n : `${target}`;\n\n throw new ERR_INVALID_PACKAGE_TARGET(\n fileURLToPath(new URL('.', packageJsonUrl)),\n subpath,\n target,\n internal,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} target\n * @param {string} subpath\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {Set} conditions\n * @returns {URL}\n */\nfunction resolvePackageTargetString(\n target,\n subpath,\n match,\n packageJsonUrl,\n base,\n pattern,\n internal,\n conditions\n) {\n if (subpath !== '' && !pattern && target[target.length - 1] !== '/')\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\n if (!target.startsWith('./')) {\n if (internal && !target.startsWith('../') && !target.startsWith('/')) {\n let isURL = false;\n\n try {\n new URL(target);\n isURL = true;\n } catch {}\n\n if (!isURL) {\n const exportTarget = pattern\n ? target.replace(patternRegEx, subpath)\n : target + subpath;\n\n return packageResolve(exportTarget, packageJsonUrl, conditions)\n }\n }\n\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n }\n\n if (invalidSegmentRegEx.test(target.slice(2)))\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\n const resolved = new URL(target, packageJsonUrl);\n const resolvedPath = resolved.pathname;\n const packagePath = new URL('.', packageJsonUrl).pathname;\n\n if (!resolvedPath.startsWith(packagePath))\n throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);\n\n if (subpath === '') return resolved\n\n if (invalidSegmentRegEx.test(subpath))\n throwInvalidSubpath(match + subpath, packageJsonUrl, internal, base);\n\n if (pattern) return new URL(resolved.href.replace(patternRegEx, subpath))\n return new URL(subpath, resolved)\n}\n\n/**\n * @param {string} key\n * @returns {boolean}\n */\nfunction isArrayIndex(key) {\n const keyNumber = Number(key);\n if (`${keyNumber}` !== key) return false\n return keyNumber >= 0 && keyNumber < 0xffff_ffff\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {unknown} target\n * @param {string} subpath\n * @param {string} packageSubpath\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {Set} conditions\n * @returns {URL}\n */\nfunction resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n conditions\n) {\n if (typeof target === 'string') {\n return resolvePackageTargetString(\n target,\n subpath,\n packageSubpath,\n packageJsonUrl,\n base,\n pattern,\n internal,\n conditions\n )\n }\n\n if (Array.isArray(target)) {\n /** @type {unknown[]} */\n const targetList = target;\n if (targetList.length === 0) return null\n\n /** @type {Error} */\n let lastException;\n let i = -1;\n\n while (++i < targetList.length) {\n const targetItem = targetList[i];\n /** @type {URL} */\n let resolved;\n try {\n resolved = resolvePackageTarget(\n packageJsonUrl,\n targetItem,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n conditions\n );\n } catch (error) {\n lastException = error;\n if (error.code === 'ERR_INVALID_PACKAGE_TARGET') continue\n throw error\n }\n\n if (resolved === undefined) continue\n\n if (resolved === null) {\n lastException = null;\n continue\n }\n\n return resolved\n }\n\n if (lastException === undefined || lastException === null) {\n // @ts-expect-error The diff between `undefined` and `null` seems to be\n // intentional\n return lastException\n }\n\n throw lastException\n }\n\n if (typeof target === 'object' && target !== null) {\n const keys = Object.getOwnPropertyNames(target);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (isArrayIndex(key)) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain numeric property keys.'\n )\n }\n }\n\n i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (key === 'default' || (conditions && conditions.has(key))) {\n /** @type {unknown} */\n const conditionalTarget = target[key];\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n conditionalTarget,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n conditions\n );\n if (resolved === undefined) continue\n return resolved\n }\n }\n\n return undefined\n }\n\n if (target === null) {\n return null\n }\n\n throwInvalidPackageTarget(\n packageSubpath,\n target,\n packageJsonUrl,\n internal,\n base\n );\n}\n\n/**\n * @param {unknown} exports\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {boolean}\n */\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n if (typeof exports === 'string' || Array.isArray(exports)) return true\n if (typeof exports !== 'object' || exports === null) return false\n\n const keys = Object.getOwnPropertyNames(exports);\n let isConditionalSugar = false;\n let i = 0;\n let j = -1;\n while (++j < keys.length) {\n const key = keys[j];\n const curIsConditionalSugar = key === '' || key[0] !== '.';\n if (i++ === 0) {\n isConditionalSugar = curIsConditionalSugar;\n } else if (isConditionalSugar !== curIsConditionalSugar) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain some keys starting with \\'.\\' and some not.' +\n ' The exports object must either be an object of package subpath keys' +\n ' or an object of main entry condition name keys only.'\n )\n }\n }\n\n return isConditionalSugar\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {string} packageSubpath\n * @param {Object.} packageConfig\n * @param {URL} base\n * @param {Set} conditions\n * @returns {ResolveObject}\n */\nfunction packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n) {\n let exports = packageConfig.exports;\n if (isConditionalExportsMainSugar(exports, packageJsonUrl, base))\n exports = {'.': exports};\n\n if (own.call(exports, packageSubpath)) {\n const target = exports[packageSubpath];\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n target,\n '',\n packageSubpath,\n base,\n false,\n false,\n conditions\n );\n if (resolved === null || resolved === undefined)\n throwExportsNotFound(packageSubpath, packageJsonUrl, base);\n return {resolved, exact: true}\n }\n\n let bestMatch = '';\n const keys = Object.getOwnPropertyNames(exports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (\n key[key.length - 1] === '*' &&\n packageSubpath.startsWith(key.slice(0, -1)) &&\n packageSubpath.length >= key.length &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n } else if (\n key[key.length - 1] === '/' &&\n packageSubpath.startsWith(key) &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n }\n }\n\n if (bestMatch) {\n const target = exports[bestMatch];\n const pattern = bestMatch[bestMatch.length - 1] === '*';\n const subpath = packageSubpath.slice(bestMatch.length - (pattern ? 1 : 0));\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n bestMatch,\n base,\n pattern,\n false,\n conditions\n );\n if (resolved === null || resolved === undefined)\n throwExportsNotFound(packageSubpath, packageJsonUrl, base);\n if (!pattern)\n emitFolderMapDeprecation(bestMatch, packageJsonUrl, true, base);\n return {resolved, exact: pattern}\n }\n\n throwExportsNotFound(packageSubpath, packageJsonUrl, base);\n}\n\n/**\n * @param {string} name\n * @param {URL} base\n * @param {Set} [conditions]\n * @returns {ResolveObject}\n */\nfunction packageImportsResolve(name, base, conditions) {\n if (name === '#' || name.startsWith('#/')) {\n const reason = 'is not a valid internal imports specifier name';\n throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base))\n }\n\n /** @type {URL} */\n let packageJsonUrl;\n\n const packageConfig = getPackageScopeConfig(base);\n\n if (packageConfig.exists) {\n packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n const imports = packageConfig.imports;\n if (imports) {\n if (own.call(imports, name)) {\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n imports[name],\n '',\n name,\n base,\n false,\n true,\n conditions\n );\n if (resolved !== null) return {resolved, exact: true}\n } else {\n let bestMatch = '';\n const keys = Object.getOwnPropertyNames(imports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n\n if (\n key[key.length - 1] === '*' &&\n name.startsWith(key.slice(0, -1)) &&\n name.length >= key.length &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n } else if (\n key[key.length - 1] === '/' &&\n name.startsWith(key) &&\n key.length > bestMatch.length\n ) {\n bestMatch = key;\n }\n }\n\n if (bestMatch) {\n const target = imports[bestMatch];\n const pattern = bestMatch[bestMatch.length - 1] === '*';\n const subpath = name.slice(bestMatch.length - (pattern ? 1 : 0));\n const resolved = resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n bestMatch,\n base,\n pattern,\n true,\n conditions\n );\n if (resolved !== null) {\n if (!pattern)\n emitFolderMapDeprecation(bestMatch, packageJsonUrl, false, base);\n return {resolved, exact: pattern}\n }\n }\n }\n }\n }\n\n throwImportNotDefined(name, packageJsonUrl, base);\n}\n\n/**\n * @param {string} url\n * @returns {PackageType}\n */\nfunction getPackageType(url) {\n const packageConfig = getPackageScopeConfig(url);\n return packageConfig.type\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n */\nfunction parsePackageName(specifier, base) {\n let separatorIndex = specifier.indexOf('/');\n let validPackageName = true;\n let isScoped = false;\n if (specifier[0] === '@') {\n isScoped = true;\n if (separatorIndex === -1 || specifier.length === 0) {\n validPackageName = false;\n } else {\n separatorIndex = specifier.indexOf('/', separatorIndex + 1);\n }\n }\n\n const packageName =\n separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\n // Package name cannot have leading . and cannot have percent-encoding or\n // separators.\n let i = -1;\n while (++i < packageName.length) {\n if (packageName[i] === '%' || packageName[i] === '\\\\') {\n validPackageName = false;\n break\n }\n }\n\n if (!validPackageName) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n specifier,\n 'is not a valid package name',\n fileURLToPath(base)\n )\n }\n\n const packageSubpath =\n '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex));\n\n return {packageName, packageSubpath, isScoped}\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n * @param {Set} conditions\n * @returns {URL}\n */\nfunction packageResolve(specifier, base, conditions) {\n const {packageName, packageSubpath, isScoped} = parsePackageName(\n specifier,\n base\n );\n\n // ResolveSelf\n const packageConfig = getPackageScopeConfig(base);\n\n // Can’t test.\n /* c8 ignore next 16 */\n if (packageConfig.exists) {\n const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n if (\n packageConfig.name === packageName &&\n packageConfig.exports !== undefined &&\n packageConfig.exports !== null\n ) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n ).resolved\n }\n }\n\n let packageJsonUrl = new URL(\n './node_modules/' + packageName + '/package.json',\n base\n );\n let packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {string} */\n let lastPath;\n do {\n const stat = tryStatSync(packageJsonPath.slice(0, -13));\n if (!stat.isDirectory()) {\n lastPath = packageJsonPath;\n packageJsonUrl = new URL(\n (isScoped ? '../../../../node_modules/' : '../../../node_modules/') +\n packageName +\n '/package.json',\n packageJsonUrl\n );\n packageJsonPath = fileURLToPath(packageJsonUrl);\n continue\n }\n\n // Package match.\n const packageConfig = getPackageConfig(packageJsonPath, specifier, base);\n if (packageConfig.exports !== undefined && packageConfig.exports !== null)\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n ).resolved\n if (packageSubpath === '.')\n return legacyMainResolve(packageJsonUrl, packageConfig, base)\n return new URL(packageSubpath, packageJsonUrl)\n // Cross-platform root check.\n } while (packageJsonPath.length !== lastPath.length)\n\n throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base))\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction isRelativeSpecifier(specifier) {\n if (specifier[0] === '.') {\n if (specifier.length === 1 || specifier[1] === '/') return true\n if (\n specifier[1] === '.' &&\n (specifier.length === 2 || specifier[2] === '/')\n ) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n if (specifier === '') return false\n if (specifier[0] === '/') return true\n return isRelativeSpecifier(specifier)\n}\n\n/**\n * The “Resolver Algorithm Specification” as detailed in the Node docs (which is\n * sync and slightly lower-level than `resolve`).\n *\n *\n *\n * @param {string} specifier\n * @param {URL} base\n * @param {Set} [conditions]\n * @returns {URL}\n */\nfunction moduleResolve(specifier, base, conditions) {\n // Order swapped from spec for minor perf gain.\n // Ok since relative URLs cannot parse as URLs.\n /** @type {URL} */\n let resolved;\n\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n resolved = new URL(specifier, base);\n } else if (specifier[0] === '#') {\n({resolved} = packageImportsResolve(specifier, base, conditions));\n } else {\n try {\n resolved = new URL(specifier);\n } catch {\n resolved = packageResolve(specifier, base, conditions);\n }\n }\n\n return finalizeResolution(resolved, base)\n}\n\n/**\n * @param {string} specifier\n * @param {{parentURL?: string, conditions?: string[]}} context\n * @returns {{url: string}}\n */\nfunction defaultResolve(specifier, context = {}) {\n const {parentURL} = context;\n /** @type {URL} */\n let parsed;\n\n try {\n parsed = new URL(specifier);\n if (parsed.protocol === 'data:') {\n return {url: specifier}\n }\n } catch {}\n\n if (parsed && parsed.protocol === 'node:') return {url: specifier}\n if (parsed && parsed.protocol !== 'file:' && parsed.protocol !== 'data:')\n throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed)\n\n if (listOfBuiltins.includes(specifier)) {\n return {url: 'node:' + specifier}\n }\n\n if (parentURL.startsWith('data:')) {\n // This is gonna blow up, we want the error\n new URL(specifier, parentURL);\n }\n\n const conditions = getConditionsSet(context.conditions);\n let url = moduleResolve(specifier, new URL(parentURL), conditions);\n\n const urlPath = fileURLToPath(url);\n const real = realpathSync(urlPath);\n const old = url;\n url = pathToFileURL(real + (urlPath.endsWith(path.sep) ? '/' : ''));\n url.search = old.search;\n url.hash = old.hash;\n\n return {url: `${url}`}\n}\n\n/**\n * Provides a module-relative resolution function scoped to each module,\n * returning the URL string.\n * `import.meta.resolve` also accepts a second argument which is the parent\n * module from which to resolve from.\n *\n * This function is asynchronous because the ES module resolver in Node.js is\n * allowed to be asynchronous.\n *\n * @param {string} specifier The module specifier to resolve relative to parent.\n * @param {string} parent The absolute parent module URL to resolve from.\n * You should pass `import.meta.url` or something else\n * @returns {Promise}\n */\nasync function resolve(specifier, parent) {\n if (!parent) {\n throw new Error(\n 'Please pass `parent`: `import-meta-resolve` cannot ponyfill that'\n )\n }\n\n try {\n return defaultResolve(specifier, {parentURL: parent}).url\n } catch (error) {\n return error.code === 'ERR_UNSUPPORTED_DIR_IMPORT'\n ? error.url\n : Promise.reject(error)\n }\n}\n\nexport { moduleResolve, resolve };\n"],"mappings":";;;;;;;AAoFA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAG,uBAAA,CAAAF,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;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AM,CAAC,CAAC,CAACsC,GAAG;IAC3D,CAAC,CAAC,OAAOljB,KAAK,EAAE;MACd,OAAOA,KAAK,CAAC2gB,IAAI,KAAK,4BAA4B,GAC9C3gB,KAAK,CAACkjB,GAAG,GACThjB,OAAO,CAACR,MAAM,CAACM,KAAK,CAAC;IAC3B;EACF,CAAC;EAAA,OAAA2rB,QAAA,CAAAlrB,KAAA,OAAAD,SAAA;AAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json index 01c629ede..5f0b5d43d 100644 --- a/node_modules/@babel/core/package.json +++ b/node_modules/@babel/core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.20.12", + "version": "7.21.3", "description": "Babel compiler core.", "main": "./lib/index.js", "author": "The Babel Team (https://babel.dev/team)", @@ -46,16 +46,16 @@ "./src/transform-file.ts": "./src/transform-file-browser.ts" }, "dependencies": { - "@ampproject/remapping": "^2.1.0", + "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helpers": "^7.20.7", - "@babel/parser": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.2", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.3", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.12", - "@babel/types": "^7.20.7", + "@babel/traverse": "^7.21.3", + "@babel/types": "^7.21.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -63,18 +63,19 @@ "semver": "^6.3.0" }, "devDependencies": { - "@babel/helper-transform-fixture-test-runner": "^7.19.4", + "@babel/helper-transform-fixture-test-runner": "^7.20.14", "@babel/plugin-syntax-flow": "^7.18.6", - "@babel/plugin-transform-flow-strip-types": "^7.19.0", - "@babel/plugin-transform-modules-commonjs": "^7.20.11", + "@babel/plugin-transform-flow-strip-types": "^7.21.0", + "@babel/plugin-transform-modules-commonjs": "^7.21.2", "@babel/preset-env": "^7.20.2", - "@jridgewell/trace-mapping": "^0.3.8", + "@jridgewell/trace-mapping": "^0.3.17", "@types/convert-source-map": "^1.5.1", "@types/debug": "^4.1.0", "@types/gensync": "^1.0.0", "@types/resolve": "^1.3.2", "@types/semver": "^5.4.0", - "rimraf": "^3.0.0" + "rimraf": "^3.0.0", + "ts-node": "^10.9.1" }, "type": "commonjs" } \ No newline at end of file diff --git a/node_modules/@babel/core/src/transform-file.ts b/node_modules/@babel/core/src/transform-file.ts index c493425db..6be73468f 100644 --- a/node_modules/@babel/core/src/transform-file.ts +++ b/node_modules/@babel/core/src/transform-file.ts @@ -40,7 +40,7 @@ export function transformFile( export function transformFile( ...args: Parameters ) { - return transformFileRunner.errback(...args); + transformFileRunner.errback(...args); } export function transformFileSync( diff --git a/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/generator/lib/buffer.js index 21393e2fc..def555245 100644 --- a/node_modules/@babel/generator/lib/buffer.js +++ b/node_modules/@babel/generator/lib/buffer.js @@ -13,12 +13,14 @@ class Buffer { this._last = 0; this._queue = []; this._queueCursor = 0; + this._canMarkIdName = true; this._position = { line: 1, column: 0 }; this._sourcePosition = { identifierName: undefined, + identifierNamePos: undefined, line: undefined, column: undefined, filename: undefined @@ -35,11 +37,12 @@ class Buffer { line: undefined, column: undefined, identifierName: undefined, + identifierNamePos: undefined, filename: "" }); } } - _pushQueue(char, repeat, line, column, identifierName, filename) { + _pushQueue(char, repeat, line, column, filename) { const cursor = this._queueCursor; if (cursor === this._queue.length) { this._allocQueue(); @@ -49,7 +52,6 @@ class Buffer { item.repeat = repeat; item.line = line; item.column = column; - item.identifierName = identifierName; item.filename = filename; this._queueCursor++; } @@ -59,13 +61,15 @@ class Buffer { } return this._queue[--this._queueCursor]; } - get() { this._flush(); const map = this._map; const result = { code: (this._buf + this._str).trimRight(), decodedMap: map == null ? void 0 : map.getDecoded(), + get __mergedMap() { + return this.map; + }, get map() { const resultMap = map ? map.get() : null; result.map = resultMap; @@ -91,7 +95,6 @@ class Buffer { }; return result; } - append(str, maybeNewline) { this._flush(); this._append(str, this._sourcePosition, maybeNewline); @@ -100,7 +103,6 @@ class Buffer { this._flush(); this._appendChar(char, 1, this._sourcePosition); } - queue(char) { if (char === 10) { while (this._queueCursor !== 0) { @@ -112,11 +114,10 @@ class Buffer { } } const sourcePosition = this._sourcePosition; - this._pushQueue(char, 1, sourcePosition.line, sourcePosition.column, sourcePosition.identifierName, sourcePosition.filename); + this._pushQueue(char, 1, sourcePosition.line, sourcePosition.column, sourcePosition.filename); } - queueIndentation(char, repeat) { - this._pushQueue(char, repeat, undefined, undefined, undefined, undefined); + this._pushQueue(char, repeat, undefined, undefined, undefined); } _flush() { const queueCursor = this._queueCursor; @@ -131,12 +132,16 @@ class Buffer { this._last = char; this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char); if (char !== 10) { - this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.filename); + this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.identifierNamePos, sourcePos.filename); this._position.column += repeat; } else { this._position.line++; this._position.column = 0; } + if (this._canMarkIdName) { + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } } _append(str, sourcePos, maybeNewline) { const len = str.length; @@ -157,32 +162,33 @@ class Buffer { const { column, identifierName, + identifierNamePos, filename } = sourcePos; let line = sourcePos.line; - + if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) { + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } let i = str.indexOf("\n"); let last = 0; - if (i !== 0) { - this._mark(line, column, identifierName, filename); + this._mark(line, column, identifierName, identifierNamePos, filename); } - while (i !== -1) { position.line++; position.column = 0; last = i + 1; - - if (last < len) { - this._mark(++line, 0, identifierName, filename); + if (last < len && line !== undefined) { + this._mark(++line, 0, null, null, filename); } i = str.indexOf("\n", last); } position.column += len - last; } - _mark(line, column, identifierName, filename) { + _mark(line, column, identifierName, identifierNamePos, filename) { var _this$_map; - (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position, line, column, identifierName, filename); + (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position, line, column, identifierName, identifierNamePos, filename); } removeTrailingNewline() { const queueCursor = this._queueCursor; @@ -200,7 +206,6 @@ class Buffer { const queueCursor = this._queueCursor; return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last; } - getNewlineCount() { const queueCursor = this._queueCursor; let count = 0; @@ -213,7 +218,6 @@ class Buffer { } return count === queueCursor && this._last === 10 ? count + 1 : count; } - endsWithCharAndNewline() { const queue = this._queue; const queueCursor = this._queueCursor; @@ -227,37 +231,46 @@ class Buffer { } } } - hasContent() { return this._queueCursor !== 0 || !!this._last; } - exactSource(loc, cb) { - if (!this._map) return cb(); + if (!this._map) { + cb(); + return; + } this.source("start", loc); + const identifierName = loc.identifierName; + const sourcePos = this._sourcePosition; + if (identifierName) { + this._canMarkIdName = false; + sourcePos.identifierName = identifierName; + } cb(); + if (identifierName) { + this._canMarkIdName = true; + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } this.source("end", loc); } - source(prop, loc) { if (!this._map) return; - this._normalizePosition(prop, loc, 0, 0); } sourceWithOffset(prop, loc, lineOffset, columnOffset) { if (!this._map) return; this._normalizePosition(prop, loc, lineOffset, columnOffset); } - withSource(prop, loc, cb) { - if (!this._map) return cb(); - this.source(prop, loc); + if (this._map) { + this.source(prop, loc); + } cb(); } _normalizePosition(prop, loc, lineOffset, columnOffset) { const pos = loc[prop]; const target = this._sourcePosition; - target.identifierName = prop === "start" && loc.identifierName || undefined; if (pos) { target.line = pos.line + lineOffset; target.column = pos.column + columnOffset; diff --git a/node_modules/@babel/generator/lib/buffer.js.map b/node_modules/@babel/generator/lib/buffer.js.map index 5f01393ed..fd712989c 100644 --- a/node_modules/@babel/generator/lib/buffer.js.map +++ b/node_modules/@babel/generator/lib/buffer.js.map @@ -1 +1 @@ -{"version":3,"names":["Buffer","constructor","map","_map","_buf","_str","_appendCount","_last","_queue","_queueCursor","_position","line","column","_sourcePosition","identifierName","undefined","filename","_allocQueue","queue","i","push","char","repeat","_pushQueue","cursor","length","item","_popQueue","Error","get","_flush","result","code","trimRight","decodedMap","getDecoded","resultMap","value","Object","defineProperty","writable","rawMappings","mappings","getRawMappings","append","str","maybeNewline","_append","appendChar","_appendChar","sourcePosition","queueIndentation","queueCursor","sourcePos","String","fromCharCode","_mark","len","position","charCodeAt","indexOf","last","mark","removeTrailingNewline","removeLastSemicolon","getLastChar","getNewlineCount","count","endsWithCharAndNewline","lastCp","hasContent","exactSource","loc","cb","source","prop","_normalizePosition","sourceWithOffset","lineOffset","columnOffset","withSource","pos","target","getCurrentColumn","lastIndex","getCurrentLine"],"sources":["../src/buffer.ts"],"sourcesContent":["import type SourceMap from \"./source-map\";\nimport * as charcodes from \"charcodes\";\n\nexport type Pos = {\n line: number;\n column: number;\n};\nexport type Loc = {\n start?: Pos;\n end?: Pos;\n identifierName?: string;\n filename?: string;\n};\ntype SourcePos = {\n identifierName: string | undefined;\n line: number | undefined;\n column: number | undefined;\n filename: string | undefined;\n};\n\ntype QueueItem = {\n char: number;\n repeat: number;\n line: number | undefined;\n column: number | undefined;\n identifierName: string | undefined;\n filename: string | undefined;\n};\n\nexport default class Buffer {\n constructor(map?: SourceMap | null) {\n this._map = map;\n\n this._allocQueue();\n }\n\n _map: SourceMap = null;\n _buf = \"\";\n _str = \"\";\n _appendCount = 0;\n _last = 0;\n _queue: QueueItem[] = [];\n _queueCursor = 0;\n\n _position = {\n line: 1,\n column: 0,\n };\n _sourcePosition: SourcePos = {\n identifierName: undefined,\n line: undefined,\n column: undefined,\n filename: undefined,\n };\n\n _allocQueue() {\n const queue = this._queue;\n\n for (let i = 0; i < 16; i++) {\n queue.push({\n char: 0,\n repeat: 1,\n line: undefined,\n column: undefined,\n identifierName: undefined,\n filename: \"\",\n });\n }\n }\n\n _pushQueue(\n char: number,\n repeat: number,\n line: number | undefined,\n column: number | undefined,\n identifierName: string | undefined,\n filename: string | undefined,\n ) {\n const cursor = this._queueCursor;\n if (cursor === this._queue.length) {\n this._allocQueue();\n }\n const item = this._queue[cursor];\n item.char = char;\n item.repeat = repeat;\n item.line = line;\n item.column = column;\n item.identifierName = identifierName;\n item.filename = filename;\n\n this._queueCursor++;\n }\n\n _popQueue(): QueueItem {\n if (this._queueCursor === 0) {\n throw new Error(\"Cannot pop from empty queue\");\n }\n return this._queue[--this._queueCursor];\n }\n\n /**\n * Get the final string output from the buffer, along with the sourcemap if one exists.\n */\n\n get() {\n this._flush();\n\n const map = this._map;\n const result = {\n // Whatever trim is used here should not execute a regex against the\n // source string since it may be arbitrarily large after all transformations\n code: (this._buf + this._str).trimRight(),\n // Decoded sourcemap is free to generate.\n decodedMap: map?.getDecoded(),\n\n // Encoding the sourcemap is moderately CPU expensive.\n get map() {\n const resultMap = map ? map.get() : null;\n result.map = resultMap;\n return resultMap;\n },\n set map(value) {\n Object.defineProperty(result, \"map\", { value, writable: true });\n },\n // Retrieving the raw mappings is very memory intensive.\n get rawMappings() {\n const mappings = map?.getRawMappings();\n result.rawMappings = mappings;\n return mappings;\n },\n set rawMappings(value) {\n Object.defineProperty(result, \"rawMappings\", { value, writable: true });\n },\n };\n\n return result;\n }\n\n /**\n * Add a string to the buffer that cannot be reverted.\n */\n\n append(str: string, maybeNewline: boolean): void {\n this._flush();\n\n this._append(str, this._sourcePosition, maybeNewline);\n }\n\n appendChar(char: number): void {\n this._flush();\n this._appendChar(char, 1, this._sourcePosition);\n }\n\n /**\n * Add a string to the buffer than can be reverted.\n */\n queue(char: number): void {\n // Drop trailing spaces when a newline is inserted.\n if (char === charcodes.lineFeed) {\n while (this._queueCursor !== 0) {\n const char = this._queue[this._queueCursor - 1].char;\n if (char !== charcodes.space && char !== charcodes.tab) {\n break;\n }\n\n this._queueCursor--;\n }\n }\n\n const sourcePosition = this._sourcePosition;\n this._pushQueue(\n char,\n 1,\n sourcePosition.line,\n sourcePosition.column,\n sourcePosition.identifierName,\n sourcePosition.filename,\n );\n }\n\n /**\n * Same as queue, but this indentation will never have a sourcmap marker.\n */\n queueIndentation(char: number, repeat: number): void {\n this._pushQueue(char, repeat, undefined, undefined, undefined, undefined);\n }\n\n _flush(): void {\n const queueCursor = this._queueCursor;\n const queue = this._queue;\n for (let i = 0; i < queueCursor; i++) {\n const item: QueueItem = queue[i];\n this._appendChar(item.char, item.repeat, item);\n }\n this._queueCursor = 0;\n }\n\n _appendChar(char: number, repeat: number, sourcePos: SourcePos): void {\n this._last = char;\n\n this._str +=\n repeat > 1\n ? String.fromCharCode(char).repeat(repeat)\n : String.fromCharCode(char);\n\n if (char !== charcodes.lineFeed) {\n this._mark(\n sourcePos.line,\n sourcePos.column,\n sourcePos.identifierName,\n sourcePos.filename,\n );\n this._position.column += repeat;\n } else {\n this._position.line++;\n this._position.column = 0;\n }\n }\n\n _append(str: string, sourcePos: SourcePos, maybeNewline: boolean): void {\n const len = str.length;\n const position = this._position;\n\n this._last = str.charCodeAt(len - 1);\n\n if (++this._appendCount > 4096) {\n +this._str; // Unexplainable huge performance boost. Ref: https://github.com/davidmarkclements/flatstr License: MIT\n this._buf += this._str;\n this._str = str;\n this._appendCount = 0;\n } else {\n this._str += str;\n }\n\n if (!maybeNewline && !this._map) {\n position.column += len;\n return;\n }\n\n const { column, identifierName, filename } = sourcePos;\n let line = sourcePos.line;\n\n // Search for newline chars. We search only for `\\n`, since both `\\r` and\n // `\\r\\n` are normalized to `\\n` during parse. We exclude `\\u2028` and\n // `\\u2029` for performance reasons, they're so uncommon that it's probably\n // ok. It's also unclear how other sourcemap utilities handle them...\n let i = str.indexOf(\"\\n\");\n let last = 0;\n\n // If the string starts with a newline char, then adding a mark is redundant.\n // This catches both \"no newlines\" and \"newline after several chars\".\n if (i !== 0) {\n this._mark(line, column, identifierName, filename);\n }\n\n // Now, find each reamining newline char in the string.\n while (i !== -1) {\n position.line++;\n position.column = 0;\n last = i + 1;\n\n // We mark the start of each line, which happens directly after this newline char\n // unless this is the last char.\n if (last < len) {\n this._mark(++line, 0, identifierName, filename);\n }\n i = str.indexOf(\"\\n\", last);\n }\n position.column += len - last;\n }\n\n _mark(\n line: number | undefined,\n column: number | undefined,\n identifierName: string | undefined,\n filename: string | undefined,\n ): void {\n this._map?.mark(this._position, line, column, identifierName, filename);\n }\n\n removeTrailingNewline(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.lineFeed\n ) {\n this._queueCursor--;\n }\n }\n\n removeLastSemicolon(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.semicolon\n ) {\n this._queueCursor--;\n }\n }\n\n getLastChar(): number {\n const queueCursor = this._queueCursor;\n return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last;\n }\n\n /**\n * This will only detect at most 1 newline after a call to `flush()`,\n * but this has not been found so far, and an accurate count can be achieved if needed later.\n */\n getNewlineCount(): number {\n const queueCursor = this._queueCursor;\n let count = 0;\n if (queueCursor === 0) return this._last === charcodes.lineFeed ? 1 : 0;\n for (let i = queueCursor - 1; i >= 0; i--) {\n if (this._queue[i].char !== charcodes.lineFeed) {\n break;\n }\n count++;\n }\n return count === queueCursor && this._last === charcodes.lineFeed\n ? count + 1\n : count;\n }\n\n /**\n * check if current _last + queue ends with newline, return the character before newline\n *\n * @param {*} ch\n * @memberof Buffer\n */\n endsWithCharAndNewline(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n if (queueCursor !== 0) {\n // every element in queue is one-length whitespace string\n const lastCp = queue[queueCursor - 1].char;\n if (lastCp !== charcodes.lineFeed) return;\n if (queueCursor > 1) {\n return queue[queueCursor - 2].char;\n } else {\n return this._last;\n }\n }\n // We assume that everything being matched is at most a single token plus some whitespace,\n // which everything currently is, but otherwise we'd have to expand _last or check _buf.\n }\n\n hasContent(): boolean {\n return this._queueCursor !== 0 || !!this._last;\n }\n\n /**\n * Certain sourcemap usecases expect mappings to be more accurate than\n * Babel's generic sourcemap handling allows. For now, we special-case\n * identifiers to allow for the primary cases to work.\n * The goal of this line is to ensure that the map output from Babel will\n * have an exact range on identifiers in the output code. Without this\n * line, Babel would potentially include some number of trailing tokens\n * that are printed after the identifier, but before another location has\n * been assigned.\n * This allows tooling like Rollup and Webpack to more accurately perform\n * their own transformations. Most importantly, this allows the import/export\n * transformations performed by those tools to loose less information when\n * applying their own transformations on top of the code and map results\n * generated by Babel itself.\n *\n * The primary example of this is the snippet:\n *\n * import mod from \"mod\";\n * mod();\n *\n * With this line, there will be one mapping range over \"mod\" and another\n * over \"();\", where previously it would have been a single mapping.\n */\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!this._map) return cb();\n\n this.source(\"start\", loc);\n\n cb();\n\n this.source(\"end\", loc);\n }\n\n /**\n * Sets a given position as the current source location so generated code after this call\n * will be given this position in the sourcemap.\n */\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!this._map) return;\n\n // Since this is called extremely often, we re-use the same _sourcePosition\n // object for the whole lifetime of the buffer.\n this._normalizePosition(prop, loc, 0, 0);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n lineOffset: number,\n columnOffset: number,\n ): void {\n if (!this._map) return;\n\n this._normalizePosition(prop, loc, lineOffset, columnOffset);\n }\n\n /**\n * Call a callback with a specific source location\n */\n\n withSource(prop: \"start\" | \"end\", loc: Loc, cb: () => void): void {\n if (!this._map) return cb();\n\n this.source(prop, loc);\n\n cb();\n }\n\n _normalizePosition(\n prop: \"start\" | \"end\",\n loc: Loc,\n lineOffset: number,\n columnOffset: number,\n ) {\n const pos = loc[prop];\n const target = this._sourcePosition;\n\n target.identifierName =\n (prop === \"start\" && loc.identifierName) || undefined;\n if (pos) {\n target.line = pos.line + lineOffset;\n target.column = pos.column + columnOffset;\n target.filename = loc.filename;\n }\n }\n\n getCurrentColumn(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n\n let lastIndex = -1;\n let len = 0;\n for (let i = 0; i < queueCursor; i++) {\n const item = queue[i];\n if (item.char === charcodes.lineFeed) {\n lastIndex = len;\n }\n len += item.repeat;\n }\n\n return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex;\n }\n\n getCurrentLine(): number {\n let count = 0;\n\n const queue = this._queue;\n for (let i = 0; i < this._queueCursor; i++) {\n if (queue[i].char === charcodes.lineFeed) {\n count++;\n }\n }\n\n return this._position.line + count;\n }\n}\n"],"mappings":";;;;;;AA6Be,MAAMA,MAAM,CAAC;EAC1BC,WAAW,CAACC,GAAsB,EAAE;IAAA,KAMpCC,IAAI,GAAc,IAAI;IAAA,KACtBC,IAAI,GAAG,EAAE;IAAA,KACTC,IAAI,GAAG,EAAE;IAAA,KACTC,YAAY,GAAG,CAAC;IAAA,KAChBC,KAAK,GAAG,CAAC;IAAA,KACTC,MAAM,GAAgB,EAAE;IAAA,KACxBC,YAAY,GAAG,CAAC;IAAA,KAEhBC,SAAS,GAAG;MACVC,IAAI,EAAE,CAAC;MACPC,MAAM,EAAE;IACV,CAAC;IAAA,KACDC,eAAe,GAAc;MAC3BC,cAAc,EAAEC,SAAS;MACzBJ,IAAI,EAAEI,SAAS;MACfH,MAAM,EAAEG,SAAS;MACjBC,QAAQ,EAAED;IACZ,CAAC;IAtBC,IAAI,CAACZ,IAAI,GAAGD,GAAG;IAEf,IAAI,CAACe,WAAW,EAAE;EACpB;EAqBAA,WAAW,GAAG;IACZ,MAAMC,KAAK,GAAG,IAAI,CAACV,MAAM;IAEzB,KAAK,IAAIW,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;MAC3BD,KAAK,CAACE,IAAI,CAAC;QACTC,IAAI,EAAE,CAAC;QACPC,MAAM,EAAE,CAAC;QACTX,IAAI,EAAEI,SAAS;QACfH,MAAM,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zB,MAAMjE,KAAK,GAAG,IAAI,CAACV,MAAM;IACzB,MAAM4C,WAAW,GAAG,IAAI,CAAC3C,YAAY;IAErC,IAAI2E,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI3B,GAAG,GAAG,CAAC;IACX,KAAK,IAAItC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGiC,WAAW,EAAEjC,CAAC,EAAE,EAAE;MACpC,MAAMO,IAAI,GAAGR,KAAK,CAACC,CAAC,CAAC;MACrB,IAAIO,IAAI,CAACL,IAAI,OAAuB,EAAE;QACpC+D,SAAS,GAAG3B,GAAG;MACjB;MACAA,GAAG,IAAI/B,IAAI,CAACJ,MAAM;IACpB;IAEA,OAAO8D,SAAS,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC1E,SAAS,CAACE,MAAM,GAAG6C,GAAG,GAAGA,GAAG,GAAG,CAAC,GAAG2B,SAAS;EAC7E;EAEAC,cAAc,GAAW;IACvB,IAAIlB,KAAK,GAAG,CAAC;IAEb,MAAMjD,KAAK,GAAG,IAAI,CAACV,MAAM;IACzB,KAAK,IAAIW,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACV,YAAY,EAAEU,CAAC,EAAE,EAAE;MAC1C,IAAID,KAAK,CAACC,CAAC,CAAC,CAACE,IAAI,OAAuB,EAAE;QACxC8C,KAAK,EAAE;MACT;IACF;IAEA,OAAO,IAAI,CAACzD,SAAS,CAACC,IAAI,GAAGwD,KAAK;EACpC;AACF;AAAC"} \ No newline at end of file +{"version":3,"names":["Buffer","constructor","map","_map","_buf","_str","_appendCount","_last","_queue","_queueCursor","_canMarkIdName","_position","line","column","_sourcePosition","identifierName","undefined","identifierNamePos","filename","_allocQueue","queue","i","push","char","repeat","_pushQueue","cursor","length","item","_popQueue","Error","get","_flush","result","code","trimRight","decodedMap","getDecoded","__mergedMap","resultMap","value","Object","defineProperty","writable","rawMappings","mappings","getRawMappings","append","str","maybeNewline","_append","appendChar","_appendChar","sourcePosition","queueIndentation","queueCursor","sourcePos","String","fromCharCode","_mark","len","position","charCodeAt","indexOf","last","_this$_map","mark","removeTrailingNewline","removeLastSemicolon","getLastChar","getNewlineCount","count","endsWithCharAndNewline","lastCp","hasContent","exactSource","loc","cb","source","prop","_normalizePosition","sourceWithOffset","lineOffset","columnOffset","withSource","pos","target","getCurrentColumn","lastIndex","getCurrentLine","exports","default"],"sources":["../src/buffer.ts"],"sourcesContent":["import type SourceMap from \"./source-map\";\nimport * as charcodes from \"charcodes\";\n\nexport type Pos = {\n line: number;\n column: number;\n};\nexport type Loc = {\n start?: Pos;\n end?: Pos;\n filename?: string;\n};\ntype SourcePos = {\n line: number | undefined;\n column: number | undefined;\n identifierName: string | undefined;\n filename: string | undefined;\n};\ntype InternalSourcePos = SourcePos & { identifierNamePos: Pos };\n\ntype QueueItem = {\n char: number;\n repeat: number;\n line: number | undefined;\n column: number | undefined;\n identifierName: undefined; // Not used, it always undefined.\n identifierNamePos: undefined; // Not used, it always undefined.\n filename: string | undefined;\n};\n\nexport default class Buffer {\n constructor(map?: SourceMap | null) {\n this._map = map;\n\n this._allocQueue();\n }\n\n _map: SourceMap = null;\n _buf = \"\";\n _str = \"\";\n _appendCount = 0;\n _last = 0;\n _queue: QueueItem[] = [];\n _queueCursor = 0;\n _canMarkIdName = true;\n\n _position = {\n line: 1,\n column: 0,\n };\n _sourcePosition: InternalSourcePos = {\n identifierName: undefined,\n identifierNamePos: undefined,\n line: undefined,\n column: undefined,\n filename: undefined,\n };\n\n _allocQueue() {\n const queue = this._queue;\n\n for (let i = 0; i < 16; i++) {\n queue.push({\n char: 0,\n repeat: 1,\n line: undefined,\n column: undefined,\n identifierName: undefined,\n identifierNamePos: undefined,\n filename: \"\",\n });\n }\n }\n\n _pushQueue(\n char: number,\n repeat: number,\n line: number | undefined,\n column: number | undefined,\n filename: string | undefined,\n ) {\n const cursor = this._queueCursor;\n if (cursor === this._queue.length) {\n this._allocQueue();\n }\n const item = this._queue[cursor];\n item.char = char;\n item.repeat = repeat;\n item.line = line;\n item.column = column;\n item.filename = filename;\n\n this._queueCursor++;\n }\n\n _popQueue(): QueueItem {\n if (this._queueCursor === 0) {\n throw new Error(\"Cannot pop from empty queue\");\n }\n return this._queue[--this._queueCursor];\n }\n\n /**\n * Get the final string output from the buffer, along with the sourcemap if one exists.\n */\n\n get() {\n this._flush();\n\n const map = this._map;\n const result = {\n // Whatever trim is used here should not execute a regex against the\n // source string since it may be arbitrarily large after all transformations\n code: (this._buf + this._str).trimRight(),\n // Decoded sourcemap is free to generate.\n decodedMap: map?.getDecoded(),\n // Used as a marker for backwards compatibility. We moved input map merging\n // into the generator. We cannot merge the input map a second time, so the\n // presence of this field tells us we've already done the work.\n get __mergedMap() {\n return this.map;\n },\n // Encoding the sourcemap is moderately CPU expensive.\n get map() {\n const resultMap = map ? map.get() : null;\n result.map = resultMap;\n return resultMap;\n },\n set map(value) {\n Object.defineProperty(result, \"map\", { value, writable: true });\n },\n // Retrieving the raw mappings is very memory intensive.\n get rawMappings() {\n const mappings = map?.getRawMappings();\n result.rawMappings = mappings;\n return mappings;\n },\n set rawMappings(value) {\n Object.defineProperty(result, \"rawMappings\", { value, writable: true });\n },\n };\n\n return result;\n }\n\n /**\n * Add a string to the buffer that cannot be reverted.\n */\n\n append(str: string, maybeNewline: boolean): void {\n this._flush();\n\n this._append(str, this._sourcePosition, maybeNewline);\n }\n\n appendChar(char: number): void {\n this._flush();\n this._appendChar(char, 1, this._sourcePosition);\n }\n\n /**\n * Add a string to the buffer than can be reverted.\n */\n queue(char: number): void {\n // Drop trailing spaces when a newline is inserted.\n if (char === charcodes.lineFeed) {\n while (this._queueCursor !== 0) {\n const char = this._queue[this._queueCursor - 1].char;\n if (char !== charcodes.space && char !== charcodes.tab) {\n break;\n }\n\n this._queueCursor--;\n }\n }\n\n const sourcePosition = this._sourcePosition;\n this._pushQueue(\n char,\n 1,\n sourcePosition.line,\n sourcePosition.column,\n sourcePosition.filename,\n );\n }\n\n /**\n * Same as queue, but this indentation will never have a sourcemap marker.\n */\n queueIndentation(char: number, repeat: number): void {\n this._pushQueue(char, repeat, undefined, undefined, undefined);\n }\n\n _flush(): void {\n const queueCursor = this._queueCursor;\n const queue = this._queue;\n for (let i = 0; i < queueCursor; i++) {\n const item: QueueItem = queue[i];\n this._appendChar(item.char, item.repeat, item);\n }\n this._queueCursor = 0;\n }\n\n _appendChar(\n char: number,\n repeat: number,\n sourcePos: InternalSourcePos,\n ): void {\n this._last = char;\n\n this._str +=\n repeat > 1\n ? String.fromCharCode(char).repeat(repeat)\n : String.fromCharCode(char);\n\n if (char !== charcodes.lineFeed) {\n this._mark(\n sourcePos.line,\n sourcePos.column,\n sourcePos.identifierName,\n sourcePos.identifierNamePos,\n sourcePos.filename,\n );\n this._position.column += repeat;\n } else {\n this._position.line++;\n this._position.column = 0;\n }\n\n if (this._canMarkIdName) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n }\n\n _append(\n str: string,\n sourcePos: InternalSourcePos,\n maybeNewline: boolean,\n ): void {\n const len = str.length;\n const position = this._position;\n\n this._last = str.charCodeAt(len - 1);\n\n if (++this._appendCount > 4096) {\n +this._str; // Unexplainable huge performance boost. Ref: https://github.com/davidmarkclements/flatstr License: MIT\n this._buf += this._str;\n this._str = str;\n this._appendCount = 0;\n } else {\n this._str += str;\n }\n\n if (!maybeNewline && !this._map) {\n position.column += len;\n return;\n }\n\n const { column, identifierName, identifierNamePos, filename } = sourcePos;\n let line = sourcePos.line;\n\n if (\n (identifierName != null || identifierNamePos != null) &&\n this._canMarkIdName\n ) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n\n // Search for newline chars. We search only for `\\n`, since both `\\r` and\n // `\\r\\n` are normalized to `\\n` during parse. We exclude `\\u2028` and\n // `\\u2029` for performance reasons, they're so uncommon that it's probably\n // ok. It's also unclear how other sourcemap utilities handle them...\n let i = str.indexOf(\"\\n\");\n let last = 0;\n\n // If the string starts with a newline char, then adding a mark is redundant.\n // This catches both \"no newlines\" and \"newline after several chars\".\n if (i !== 0) {\n this._mark(line, column, identifierName, identifierNamePos, filename);\n }\n\n // Now, find each remaining newline char in the string.\n while (i !== -1) {\n position.line++;\n position.column = 0;\n last = i + 1;\n\n // We mark the start of each line, which happens directly after this newline char\n // unless this is the last char.\n // When manually adding multi-line content (such as a comment), `line` will be `undefined`.\n if (last < len && line !== undefined) {\n this._mark(++line, 0, null, null, filename);\n }\n i = str.indexOf(\"\\n\", last);\n }\n position.column += len - last;\n }\n\n _mark(\n line: number | undefined,\n column: number | undefined,\n identifierName: string | undefined,\n identifierNamePos: Pos | undefined,\n filename: string | undefined,\n ): void {\n this._map?.mark(\n this._position,\n line,\n column,\n identifierName,\n identifierNamePos,\n filename,\n );\n }\n\n removeTrailingNewline(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.lineFeed\n ) {\n this._queueCursor--;\n }\n }\n\n removeLastSemicolon(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.semicolon\n ) {\n this._queueCursor--;\n }\n }\n\n getLastChar(): number {\n const queueCursor = this._queueCursor;\n return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last;\n }\n\n /**\n * This will only detect at most 1 newline after a call to `flush()`,\n * but this has not been found so far, and an accurate count can be achieved if needed later.\n */\n getNewlineCount(): number {\n const queueCursor = this._queueCursor;\n let count = 0;\n if (queueCursor === 0) return this._last === charcodes.lineFeed ? 1 : 0;\n for (let i = queueCursor - 1; i >= 0; i--) {\n if (this._queue[i].char !== charcodes.lineFeed) {\n break;\n }\n count++;\n }\n return count === queueCursor && this._last === charcodes.lineFeed\n ? count + 1\n : count;\n }\n\n /**\n * check if current _last + queue ends with newline, return the character before newline\n *\n * @param {*} ch\n * @memberof Buffer\n */\n endsWithCharAndNewline(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n if (queueCursor !== 0) {\n // every element in queue is one-length whitespace string\n const lastCp = queue[queueCursor - 1].char;\n if (lastCp !== charcodes.lineFeed) return;\n if (queueCursor > 1) {\n return queue[queueCursor - 2].char;\n } else {\n return this._last;\n }\n }\n // We assume that everything being matched is at most a single token plus some whitespace,\n // which everything currently is, but otherwise we'd have to expand _last or check _buf.\n }\n\n hasContent(): boolean {\n return this._queueCursor !== 0 || !!this._last;\n }\n\n /**\n * Certain sourcemap usecases expect mappings to be more accurate than\n * Babel's generic sourcemap handling allows. For now, we special-case\n * identifiers to allow for the primary cases to work.\n * The goal of this line is to ensure that the map output from Babel will\n * have an exact range on identifiers in the output code. Without this\n * line, Babel would potentially include some number of trailing tokens\n * that are printed after the identifier, but before another location has\n * been assigned.\n * This allows tooling like Rollup and Webpack to more accurately perform\n * their own transformations. Most importantly, this allows the import/export\n * transformations performed by those tools to loose less information when\n * applying their own transformations on top of the code and map results\n * generated by Babel itself.\n *\n * The primary example of this is the snippet:\n *\n * import mod from \"mod\";\n * mod();\n *\n * With this line, there will be one mapping range over \"mod\" and another\n * over \"();\", where previously it would have been a single mapping.\n */\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!this._map) {\n cb();\n return;\n }\n\n this.source(\"start\", loc);\n // @ts-expect-error identifierName is not defined\n const identifierName = loc.identifierName;\n const sourcePos = this._sourcePosition;\n if (identifierName) {\n this._canMarkIdName = false;\n sourcePos.identifierName = identifierName;\n }\n cb();\n\n if (identifierName) {\n this._canMarkIdName = true;\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n this.source(\"end\", loc);\n }\n\n /**\n * Sets a given position as the current source location so generated code after this call\n * will be given this position in the sourcemap.\n */\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!this._map) return;\n\n // Since this is called extremely often, we re-use the same _sourcePosition\n // object for the whole lifetime of the buffer.\n this._normalizePosition(prop, loc, 0, 0);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n lineOffset: number,\n columnOffset: number,\n ): void {\n if (!this._map) return;\n\n this._normalizePosition(prop, loc, lineOffset, columnOffset);\n }\n\n /**\n * Call a callback with a specific source location\n */\n\n withSource(prop: \"start\" | \"end\", loc: Loc, cb: () => void): void {\n if (this._map) {\n this.source(prop, loc);\n }\n\n cb();\n }\n\n _normalizePosition(\n prop: \"start\" | \"end\",\n loc: Loc,\n lineOffset: number,\n columnOffset: number,\n ) {\n const pos = loc[prop];\n const target = this._sourcePosition;\n\n if (pos) {\n target.line = pos.line + lineOffset;\n target.column = pos.column + columnOffset;\n target.filename = loc.filename;\n }\n }\n\n getCurrentColumn(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n\n let lastIndex = -1;\n let len = 0;\n for (let i = 0; i < queueCursor; i++) {\n const item = queue[i];\n if (item.char === charcodes.lineFeed) {\n lastIndex = len;\n }\n len += item.repeat;\n }\n\n return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex;\n }\n\n getCurrentLine(): number {\n let count = 0;\n\n const queue = this._queue;\n for (let i = 0; i < this._queueCursor; i++) {\n if (queue[i].char === charcodes.lineFeed) {\n count++;\n }\n }\n\n return this._position.line + count;\n }\n}\n"],"mappings":";;;;;;AA8Be,MAAMA,MAAM,CAAC;EAC1BC,WAAWA,CAACC,GAAsB,EAAE;IAAA,KAMpCC,IAAI,GAAc,IAAI;IAAA,KACtBC,IAAI,GAAG,EAAE;IAAA,KACTC,IAAI,GAAG,EAAE;IAAA,KACTC,YAAY,GAAG,CAAC;IAAA,KAChBC,KAAK,GAAG,CAAC;IAAA,KACTC,MAAM,GAAgB,EAAE;IAAA,KACxBC,YAAY,GAAG,CAAC;IAAA,KAChBC,cAAc,GAAG,IAAI;IAAA,KAErBC,SAAS,GAAG;MACVC,IAAI,EAAE,CAAC;MACPC,MAAM,EAAE;IACV,CAAC;IAAA,KACDC,eAAe,GAAsB;MACnCC,cAAc,EAAEC,SAAS;MACzBC,iBAAiB,EAAED,SAAS;MAC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AA,EAAW;IACzB,MAAMnE,KAAK,GAAG,IAAI,CAACZ,MAAM;IACzB,MAAM+C,WAAW,GAAG,IAAI,CAAC9C,YAAY;IAErC,IAAI+E,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI5B,GAAG,GAAG,CAAC;IACX,KAAK,IAAIvC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGkC,WAAW,EAAElC,CAAC,EAAE,EAAE;MACpC,MAAMO,IAAI,GAAGR,KAAK,CAACC,CAAC,CAAC;MACrB,IAAIO,IAAI,CAACL,IAAI,OAAuB,EAAE;QACpCiE,SAAS,GAAG5B,GAAG;MACjB;MACAA,GAAG,IAAIhC,IAAI,CAACJ,MAAM;IACpB;IAEA,OAAOgE,SAAS,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC7E,SAAS,CAACE,MAAM,GAAG+C,GAAG,GAAGA,GAAG,GAAG,CAAC,GAAG4B,SAAS;EAC7E;EAEAC,cAAcA,CAAA,EAAW;IACvB,IAAIlB,KAAK,GAAG,CAAC;IAEb,MAAMnD,KAAK,GAAG,IAAI,CAACZ,MAAM;IACzB,KAAK,IAAIa,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACZ,YAAY,EAAEY,CAAC,EAAE,EAAE;MAC1C,IAAID,KAAK,CAACC,CAAC,CAAC,CAACE,IAAI,OAAuB,EAAE;QACxCgD,KAAK,EAAE;MACT;IACF;IAEA,OAAO,IAAI,CAAC5D,SAAS,CAACC,IAAI,GAAG2D,KAAK;EACpC;AACF;AAACmB,OAAA,CAAAC,OAAA,GAAA3F,MAAA"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/base.js b/node_modules/@babel/generator/lib/generators/base.js index cf6da0cf9..2c54f7ae3 100644 --- a/node_modules/@babel/generator/lib/generators/base.js +++ b/node_modules/@babel/generator/lib/generators/base.js @@ -58,7 +58,6 @@ function Directive(node) { this.print(node.value, node); this.semicolon(); } - const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/; const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/; function DirectiveLiteral(node) { @@ -70,7 +69,6 @@ function DirectiveLiteral(node) { const { value } = node; - if (!unescapedDoubleQuoteRE.test(value)) { this.token(`"${value}"`); } else if (!unescapedSingleQuoteRE.test(value)) { diff --git a/node_modules/@babel/generator/lib/generators/base.js.map b/node_modules/@babel/generator/lib/generators/base.js.map index 62a2aa637..065b22a38 100644 --- a/node_modules/@babel/generator/lib/generators/base.js.map +++ b/node_modules/@babel/generator/lib/generators/base.js.map @@ -1 +1 @@ -{"version":3,"names":["File","node","program","print","interpreter","Program","noIndentInnerCommentsHere","printInnerComments","directivesLen","directives","length","newline","body","printSequence","trailingCommentsLineOffset","trailingComments","BlockStatement","token","indent","sourceWithOffset","loc","rightBrace","Directive","value","semicolon","unescapedSingleQuoteRE","unescapedDoubleQuoteRE","DirectiveLiteral","raw","getPossibleRaw","format","minified","undefined","test","Error","InterpreterDirective","Placeholder","name","expectedNode"],"sources":["../../src/generators/base.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function File(this: Printer, node: t.File) {\n if (node.program) {\n // Print this here to ensure that Program node 'leadingComments' still\n // get printed after the hashbang.\n this.print(node.program.interpreter, node);\n }\n\n this.print(node.program, node);\n}\n\nexport function Program(this: Printer, node: t.Program) {\n // An empty Program doesn't have any inner tokens, so\n // we must explicitly print its inner comments.\n this.noIndentInnerCommentsHere();\n this.printInnerComments();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, node, {\n trailingCommentsLineOffset: newline,\n });\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, node);\n}\n\nexport function BlockStatement(this: Printer, node: t.BlockStatement) {\n this.token(\"{\");\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, node, {\n indent: true,\n trailingCommentsLineOffset: newline,\n });\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, node, { indent: true });\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.rightBrace();\n}\n\nexport function Directive(this: Printer, node: t.Directive) {\n this.print(node.value, node);\n this.semicolon();\n}\n\n// These regexes match an even number of \\ followed by a quote\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nexport function DirectiveLiteral(this: Printer, node: t.DirectiveLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const { value } = node;\n\n // NOTE: In directives we can't change escapings,\n // because they change the behavior.\n // e.g. \"us\\x65 strict\" (\\x65 is e) is not a \"use strict\" directive.\n\n if (!unescapedDoubleQuoteRE.test(value)) {\n this.token(`\"${value}\"`);\n } else if (!unescapedSingleQuoteRE.test(value)) {\n this.token(`'${value}'`);\n } else {\n throw new Error(\n \"Malformed AST: it is not possible to print a directive containing\" +\n \" both unescaped single and double quotes.\",\n );\n }\n}\n\nexport function InterpreterDirective(\n this: Printer,\n node: t.InterpreterDirective,\n) {\n this.token(`#!${node.value}`);\n this.newline(1, true);\n}\n\nexport function Placeholder(this: Printer, node: t.Placeholder) {\n this.token(\"%%\");\n this.print(node.name);\n this.token(\"%%\");\n\n if (node.expectedNode === \"Statement\") {\n this.semicolon();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGO,SAASA,IAAI,CAAgBC,IAAY,EAAE;EAChD,IAAIA,IAAI,CAACC,OAAO,EAAE;IAGhB,IAAI,CAACC,KAAK,CAACF,IAAI,CAACC,OAAO,CAACE,WAAW,EAAEH,IAAI,CAAC;EAC5C;EAEA,IAAI,CAACE,KAAK,CAACF,IAAI,CAACC,OAAO,E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,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC;AACvB;AAEO,SAASyB,WAAW,CAAgBnC,IAAmB,EAAE;EAC9D,IAAI,CAACgB,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACd,KAAK,CAACF,IAAI,CAACoC,IAAI,CAAC;EACrB,IAAI,CAACpB,KAAK,CAAC,IAAI,CAAC;EAEhB,IAAIhB,IAAI,CAACqC,YAAY,KAAK,WAAW,EAAE;IACrC,IAAI,CAACd,SAAS,EAAE;EAClB;AACF"} \ No newline at end of file +{"version":3,"names":["File","node","program","print","interpreter","Program","_node$directives","noIndentInnerCommentsHere","printInnerComments","directivesLen","directives","length","_node$directives$trai","newline","body","printSequence","trailingCommentsLineOffset","trailingComments","BlockStatement","_node$directives2","token","_node$directives$trai2","indent","sourceWithOffset","loc","rightBrace","Directive","value","semicolon","unescapedSingleQuoteRE","unescapedDoubleQuoteRE","DirectiveLiteral","raw","getPossibleRaw","format","minified","undefined","test","Error","InterpreterDirective","Placeholder","name","expectedNode"],"sources":["../../src/generators/base.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function File(this: Printer, node: t.File) {\n if (node.program) {\n // Print this here to ensure that Program node 'leadingComments' still\n // get printed after the hashbang.\n this.print(node.program.interpreter, node);\n }\n\n this.print(node.program, node);\n}\n\nexport function Program(this: Printer, node: t.Program) {\n // An empty Program doesn't have any inner tokens, so\n // we must explicitly print its inner comments.\n this.noIndentInnerCommentsHere();\n this.printInnerComments();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, node, {\n trailingCommentsLineOffset: newline,\n });\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, node);\n}\n\nexport function BlockStatement(this: Printer, node: t.BlockStatement) {\n this.token(\"{\");\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, node, {\n indent: true,\n trailingCommentsLineOffset: newline,\n });\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, node, { indent: true });\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.rightBrace();\n}\n\nexport function Directive(this: Printer, node: t.Directive) {\n this.print(node.value, node);\n this.semicolon();\n}\n\n// These regexes match an even number of \\ followed by a quote\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nexport function DirectiveLiteral(this: Printer, node: t.DirectiveLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const { value } = node;\n\n // NOTE: In directives we can't change escapings,\n // because they change the behavior.\n // e.g. \"us\\x65 strict\" (\\x65 is e) is not a \"use strict\" directive.\n\n if (!unescapedDoubleQuoteRE.test(value)) {\n this.token(`\"${value}\"`);\n } else if (!unescapedSingleQuoteRE.test(value)) {\n this.token(`'${value}'`);\n } else {\n throw new Error(\n \"Malformed AST: it is not possible to print a directive containing\" +\n \" both unescaped single and double quotes.\",\n );\n }\n}\n\nexport function InterpreterDirective(\n this: Printer,\n node: t.InterpreterDirective,\n) {\n this.token(`#!${node.value}`);\n this.newline(1, true);\n}\n\nexport function Placeholder(this: Printer, node: t.Placeholder) {\n this.token(\"%%\");\n this.print(node.name);\n this.token(\"%%\");\n\n if (node.expectedNode === \"Statement\") {\n this.semicolon();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGO,SAASA,IAAIA,CAAgBC,IAAY,EAAE;EAChD,IAAIA,IAAI,CAACC,OAAO,EAAE;IAGhB,IAAI,CAACC,KAAK,CAACF,IAAI,CAACC,OAAO,CAACE,WAAW,EAAEH,IAAI,CAAC;EAC5C;EAEA,IAAI,CAACE,KAAK,CAACF,IAAI,CA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AA2C,CAC9C;EACH;AACF;AAEO,SAASC,oBAAoBA,CAElCtC,IAA4B,EAC5B;EACA,IAAI,CAACmB,KAAK,CAAE,KAAInB,IAAI,CAAC0B,KAAM,EAAC,CAAC;EAC7B,IAAI,CAACd,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC;AACvB;AAEO,SAAS2B,WAAWA,CAAgBvC,IAAmB,EAAE;EAC9D,IAAI,CAACmB,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACjB,KAAK,CAACF,IAAI,CAACwC,IAAI,CAAC;EACrB,IAAI,CAACrB,KAAK,CAAC,IAAI,CAAC;EAEhB,IAAInB,IAAI,CAACyC,YAAY,KAAK,WAAW,EAAE;IACrC,IAAI,CAACd,SAAS,EAAE;EAClB;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/classes.js b/node_modules/@babel/generator/lib/generators/classes.js index bd8f780d6..b7435768d 100644 --- a/node_modules/@babel/generator/lib/generators/classes.js +++ b/node_modules/@babel/generator/lib/generators/classes.js @@ -18,10 +18,9 @@ const { isExportNamedDeclaration } = _t; function ClassDeclaration(node, parent) { - { - if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) { - this.printJoin(node.decorators, node); - } + const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent); + if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) { + this.printJoin(node.decorators, node); } if (node.declare) { this.word("declare"); @@ -70,7 +69,6 @@ function ClassBody(node) { function ClassProperty(node) { var _node$key$loc, _node$key$loc$end; this.printJoin(node.decorators, node); - const endLine = (_node$key$loc = node.key.loc) == null ? void 0 : (_node$key$loc$end = _node$key$loc.end) == null ? void 0 : _node$key$loc$end.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); @@ -82,7 +80,6 @@ function ClassProperty(node) { this._variance(node); this.print(node.key, node); } - if (node.optional) { this.tokenChar(63); } @@ -101,10 +98,8 @@ function ClassProperty(node) { function ClassAccessorProperty(node) { var _node$key$loc2, _node$key$loc2$end; this.printJoin(node.decorators, node); - const endLine = (_node$key$loc2 = node.key.loc) == null ? void 0 : (_node$key$loc2$end = _node$key$loc2.end) == null ? void 0 : _node$key$loc2$end.line; if (endLine) this.catchUp(endLine); - this.tsPrintClassMemberModifiers(node); this.word("accessor", true); this.space(); @@ -116,7 +111,6 @@ function ClassAccessorProperty(node) { this._variance(node); this.print(node.key, node); } - if (node.optional) { this.tokenChar(63); } @@ -161,7 +155,6 @@ function ClassPrivateMethod(node) { function _classMethodHead(node) { var _node$key$loc3, _node$key$loc3$end; this.printJoin(node.decorators, node); - const endLine = (_node$key$loc3 = node.key.loc) == null ? void 0 : (_node$key$loc3$end = _node$key$loc3.end) == null ? void 0 : _node$key$loc3$end.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); diff --git a/node_modules/@babel/generator/lib/generators/classes.js.map b/node_modules/@babel/generator/lib/generators/classes.js.map index 990bd3a9c..accee35f0 100644 --- a/node_modules/@babel/generator/lib/generators/classes.js.map +++ b/node_modules/@babel/generator/lib/generators/classes.js.map @@ -1 +1 @@ -{"version":3,"names":["isExportDefaultDeclaration","isExportNamedDeclaration","ClassDeclaration","node","parent","format","decoratorsBeforeExport","printJoin","decorators","declare","word","space","abstract","id","print","typeParameters","superClass","superTypeParameters","implements","printList","body","ClassBody","token","length","newline","indent","printSequence","dedent","endsWith","sourceWithOffset","loc","rightBrace","ClassProperty","endLine","key","end","line","catchUp","tsPrintClassMemberModifiers","computed","_variance","optional","definite","typeAnnotation","value","semicolon","ClassAccessorProperty","ClassPrivateProperty","static","ClassMethod","_classMethodHead","ClassPrivateMethod","_methodHead","StaticBlock"],"sources":["../../src/generators/classes.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isExportDefaultDeclaration,\n isExportNamedDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nexport function ClassDeclaration(\n this: Printer,\n node: t.ClassDeclaration,\n parent: t.Node,\n) {\n if (process.env.BABEL_8_BREAKING) {\n this.printJoin(node.decorators, node);\n } else {\n if (\n !this.format.decoratorsBeforeExport ||\n (!isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent))\n ) {\n this.printJoin(node.decorators, node);\n }\n }\n\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n if (node.abstract) {\n // TS\n this.word(\"abstract\");\n this.space();\n }\n\n this.word(\"class\");\n\n if (node.id) {\n this.space();\n this.print(node.id, node);\n }\n\n this.print(node.typeParameters, node);\n\n if (node.superClass) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.superClass, node);\n this.print(node.superTypeParameters, node);\n }\n\n if (node.implements) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n\n this.space();\n this.print(node.body, node);\n}\n\nexport { ClassDeclaration as ClassExpression };\n\nexport function ClassBody(this: Printer, node: t.ClassBody) {\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n\n this.indent();\n this.printSequence(node.body, node);\n this.dedent();\n\n if (!this.endsWith(charCodes.lineFeed)) this.newline();\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.rightBrace();\n }\n}\n\nexport function ClassProperty(this: Printer, node: t.ClassProperty) {\n this.printJoin(node.decorators, node);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n this.tsPrintClassMemberModifiers(node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n this._variance(node);\n this.print(node.key, node);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassAccessorProperty(\n this: Printer,\n node: t.ClassAccessorProperty,\n) {\n this.printJoin(node.decorators, node);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n // TS does not support class accessor property yet\n this.tsPrintClassMemberModifiers(node);\n\n this.word(\"accessor\", true);\n this.space();\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // Todo: Flow does not support class accessor property yet.\n this._variance(node);\n this.print(node.key, node);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassPrivateProperty(\n this: Printer,\n node: t.ClassPrivateProperty,\n) {\n this.printJoin(node.decorators, node);\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.key, node);\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassMethod(this: Printer, node: t.ClassMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ClassPrivateMethod(this: Printer, node: t.ClassPrivateMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function _classMethodHead(\n this: Printer,\n node: t.ClassMethod | t.ClassPrivateMethod | t.TSDeclareMethod,\n) {\n this.printJoin(node.decorators, node);\n\n // catch up to method key, avoid line break\n // between member modifiers/method heads and the method key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n this.tsPrintClassMemberModifiers(node);\n this._methodHead(node);\n}\n\nexport function StaticBlock(this: Printer, node: t.StaticBlock) {\n this.word(\"static\");\n this.space();\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n this.printSequence(node.body, node, {\n indent: true,\n });\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.rightBrace();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;AAGsB;EAFpBA,0BAA0B;EAC1BC;AAAwB;AAKnB,SAASC,gBAAgB,CAE9BC,IAAwB,EACxBC,MAAc,EACd;EAGO;IACL,IACE,CAAC,IAAI,CAACC,MAAM,CAACC,sBAAsB,IAClC,CAACN,0BAA0B,CAACI,MAAM,CAAC,IAAI,CAACH,wBAAwB,CAACG,MAAM,CAAE,EAC1E;MACA,IAAI,CAACG,SAAS,CAACJ,IAAI,CAACK,UAAU,EAAEL,IAAI,CAAC;IACvC;EACF;EAEA,IAAIA,IAAI,CAACM,OAAO,EAAE;IAEhB,IAAI,CAACC,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACC,KAAK,EAAE;EACd;EAEA,IAAIR,IAAI,CAACS,QAAQ,EAAE;IAEjB,IAAI,CAACF,IAAI,CAAC,UAAU,CAAC;IACrB,IAAI,CAACC,KAAK,EAAE;EACd;EAEA,IAAI,CAACD,IAAI,CAAC,OAAO,CAAC;EAElB,IAAIP,IAAI,CAACU,EAAE,EAAE;IACX,IAAI,CAACF,KAAK,EAAE;IACZ,IAAI,CAACG,KAAK,CAACX,IAAI,CAACU,EAAE,EAAEV,IAAI,CAAC;EAC3B;EAEA,IAAI,CAACW,KAAK,CAACX,IAAI,CAACY,cAAc,EAAEZ,IAAI,CAAC;EAErC,IAAIA,IAAI,CAACa,UAAU,EAAE;IACnB,IAAI,CAACL,KAAK,EAAE;IACZ,IAAI,CAACD,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACC,KAAK,EAAE;IACZ,IAAI,CAACG,KAAK,CAACX,IAAI,CAACa,UAAU,EAAEb,IAAI,CAAC;IACjC,IAAI,CAACW,KAAK,CAACX,IAAI,CAACc,mBAAmB,EAAEd,IAAI,CAAC;EAC5C;EAEA,I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IAAI,CAACiB,IAAI,EAAEjB,IAAI,EAAE;MAClCsB,MAAM,EAAE;IACV,CAAC,CAAC;IAEF,IAAI,CAACI,gBAAgB,CAAC,KAAK,EAAE1B,IAAI,CAAC2B,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7C,IAAI,CAACC,UAAU,EAAE;EACnB;AACF"} \ No newline at end of file +{"version":3,"names":["_t","require","isExportDefaultDeclaration","isExportNamedDeclaration","ClassDeclaration","node","parent","inExport","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","declare","word","space","abstract","id","print","typeParameters","superClass","superTypeParameters","implements","printList","body","ClassBody","token","length","newline","indent","printSequence","dedent","endsWith","sourceWithOffset","loc","rightBrace","ClassProperty","_node$key$loc","_node$key$loc$end","endLine","key","end","line","catchUp","tsPrintClassMemberModifiers","computed","_variance","optional","definite","typeAnnotation","value","semicolon","ClassAccessorProperty","_node$key$loc2","_node$key$loc2$end","ClassPrivateProperty","static","ClassMethod","_classMethodHead","ClassPrivateMethod","_node$key$loc3","_node$key$loc3$end","_methodHead","StaticBlock"],"sources":["../../src/generators/classes.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isExportDefaultDeclaration,\n isExportNamedDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nexport function ClassDeclaration(\n this: Printer,\n node: t.ClassDeclaration,\n parent: t.Node,\n) {\n const inExport =\n isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);\n\n if (\n !inExport ||\n !this._shouldPrintDecoratorsBeforeExport(\n parent as t.ExportDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n this.printJoin(node.decorators, node);\n }\n\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n if (node.abstract) {\n // TS\n this.word(\"abstract\");\n this.space();\n }\n\n this.word(\"class\");\n\n if (node.id) {\n this.space();\n this.print(node.id, node);\n }\n\n this.print(node.typeParameters, node);\n\n if (node.superClass) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.superClass, node);\n this.print(node.superTypeParameters, node);\n }\n\n if (node.implements) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n\n this.space();\n this.print(node.body, node);\n}\n\nexport { ClassDeclaration as ClassExpression };\n\nexport function ClassBody(this: Printer, node: t.ClassBody) {\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n\n this.indent();\n this.printSequence(node.body, node);\n this.dedent();\n\n if (!this.endsWith(charCodes.lineFeed)) this.newline();\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.rightBrace();\n }\n}\n\nexport function ClassProperty(this: Printer, node: t.ClassProperty) {\n this.printJoin(node.decorators, node);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n this.tsPrintClassMemberModifiers(node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n this._variance(node);\n this.print(node.key, node);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassAccessorProperty(\n this: Printer,\n node: t.ClassAccessorProperty,\n) {\n this.printJoin(node.decorators, node);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n // TS does not support class accessor property yet\n this.tsPrintClassMemberModifiers(node);\n\n this.word(\"accessor\", true);\n this.space();\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // Todo: Flow does not support class accessor property yet.\n this._variance(node);\n this.print(node.key, node);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassPrivateProperty(\n this: Printer,\n node: t.ClassPrivateProperty,\n) {\n this.printJoin(node.decorators, node);\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.key, node);\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassMethod(this: Printer, node: t.ClassMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ClassPrivateMethod(this: Printer, node: t.ClassPrivateMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function _classMethodHead(\n this: Printer,\n node: t.ClassMethod | t.ClassPrivateMethod | t.TSDeclareMethod,\n) {\n this.printJoin(node.decorators, node);\n\n // catch up to method key, avoid line break\n // between member modifiers/method heads and the method key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n this.tsPrintClassMemberModifiers(node);\n this._methodHead(node);\n}\n\nexport function StaticBlock(this: Printer, node: t.StaticBlock) {\n this.word(\"static\");\n this.space();\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n this.printSequence(node.body, node, {\n indent: true,\n });\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.rightBrace();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAGsB;EAFpBC,0BAA0B;EAC1BC;AAAwB,IAAAH,EAAA;AAKnB,SAASI,gBAAgBA,CAE9BC,IAAwB,EACxBC,MAAc,EACd;EACA,MAAMC,QAAQ,GACZL,0BAA0B,CAACI,MAAM,CAAC,IAAIH,wBAAwB,CAACG,MAAM,CAAC;EAExE,IACE,CAACC,QAAQ,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K,EAAE1B,IAAI,CAAC2B,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7C,IAAI,CAACC,UAAU,EAAE;EACnB;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/expressions.js b/node_modules/@babel/generator/lib/generators/expressions.js index f35a28914..3eb7d3aaf 100644 --- a/node_modules/@babel/generator/lib/generators/expressions.js +++ b/node_modules/@babel/generator/lib/generators/expressions.js @@ -29,6 +29,7 @@ exports.UnaryExpression = UnaryExpression; exports.UpdateExpression = UpdateExpression; exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier; exports.YieldExpression = YieldExpression; +exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport; var _t = require("@babel/types"); var n = require("../node"); const { @@ -38,8 +39,7 @@ const { isNewExpression } = _t; function UnaryExpression(node) { - if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || - node.operator === "throw") { + if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { this.word(node.operator); this.space(); } else { @@ -92,7 +92,6 @@ function NewExpression(node, parent) { } this.print(node.typeArguments, node); this.print(node.typeParameters, node); - if (node.optional) { this.token("?."); } @@ -125,6 +124,12 @@ function shouldParenthesizeDecoratorExpression(node) { } return !isDecoratorMemberExpression(node.type === "CallExpression" ? node.callee : node); } +function _shouldPrintDecoratorsBeforeExport(node) { + if (typeof this.format.decoratorsBeforeExport === "boolean") { + return this.format.decoratorsBeforeExport; + } + return typeof node.start === "number" && node.start === node.declaration.start; +} function Decorator(node) { this.tokenChar(64); const { @@ -165,12 +170,10 @@ function OptionalMemberExpression(node) { function OptionalCallExpression(node) { this.print(node.callee, node); this.print(node.typeParameters, node); - if (node.optional) { this.token("?."); } this.print(node.typeArguments, node); - this.tokenChar(40); this.printList(node.arguments, node); this.tokenChar(41); @@ -211,7 +214,6 @@ function YieldExpression(node) { function EmptyStatement() { this.semicolon(true); } - function ExpressionStatement(node) { this.print(node.expression, node); this.semicolon(); diff --git a/node_modules/@babel/generator/lib/generators/expressions.js.map b/node_modules/@babel/generator/lib/generators/expressions.js.map index abdac34d7..a9619b376 100644 --- a/node_modules/@babel/generator/lib/generators/expressions.js.map +++ b/node_modules/@babel/generator/lib/generators/expressions.js.map @@ -1 +1 @@ -{"version":3,"names":["isCallExpression","isLiteral","isMemberExpression","isNewExpression","UnaryExpression","node","operator","word","space","token","print","argument","DoExpression","async","body","ParenthesizedExpression","expression","UpdateExpression","prefix","printTerminatorless","ConditionalExpression","test","consequent","alternate","NewExpression","parent","callee","format","minified","arguments","length","optional","typeArguments","typeParameters","printList","SequenceExpression","expressions","ThisExpression","Super","isDecoratorMemberExpression","type","computed","property","object","shouldParenthesizeDecoratorExpression","Decorator","newline","OptionalMemberExpression","TypeError","value","OptionalCallExpression","CallExpression","Import","AwaitExpression","YieldExpression","delegate","EmptyStatement","semicolon","ExpressionStatement","AssignmentPattern","left","typeAnnotation","right","AssignmentExpression","parens","inForStatementInitCounter","n","needsParens","BindExpression","MemberExpression","MetaProperty","meta","PrivateName","id","V8IntrinsicIdentifier","name","ModuleExpression","indent","directives","dedent","sourceWithOffset","loc","rightBrace"],"sources":["../../src/generators/expressions.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isCallExpression,\n isLiteral,\n isMemberExpression,\n isNewExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as n from \"../node\";\n\nexport function UnaryExpression(this: Printer, node: t.UnaryExpression) {\n if (\n node.operator === \"void\" ||\n node.operator === \"delete\" ||\n node.operator === \"typeof\" ||\n // throwExpressions\n node.operator === \"throw\"\n ) {\n this.word(node.operator);\n this.space();\n } else {\n this.token(node.operator);\n }\n\n this.print(node.argument, node);\n}\n\nexport function DoExpression(this: Printer, node: t.DoExpression) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n this.word(\"do\");\n this.space();\n this.print(node.body, node);\n}\n\nexport function ParenthesizedExpression(\n this: Printer,\n node: t.ParenthesizedExpression,\n) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.token(\")\");\n}\n\nexport function UpdateExpression(this: Printer, node: t.UpdateExpression) {\n if (node.prefix) {\n this.token(node.operator);\n this.print(node.argument, node);\n } else {\n this.printTerminatorless(node.argument, node, true);\n this.token(node.operator);\n }\n}\n\nexport function ConditionalExpression(\n this: Printer,\n node: t.ConditionalExpression,\n) {\n this.print(node.test, node);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.consequent, node);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.alternate, node);\n}\n\nexport function NewExpression(\n this: Printer,\n node: t.NewExpression,\n parent: t.Node,\n) {\n this.word(\"new\");\n this.space();\n this.print(node.callee, node);\n if (\n this.format.minified &&\n node.arguments.length === 0 &&\n !node.optional &&\n !isCallExpression(parent, { callee: node }) &&\n !isMemberExpression(parent) &&\n !isNewExpression(parent)\n ) {\n return;\n }\n\n this.print(node.typeArguments, node); // Flow\n this.print(node.typeParameters, node); // TS\n\n if (node.optional) {\n // TODO: This can never happen\n this.token(\"?.\");\n }\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.token(\")\");\n}\n\nexport function SequenceExpression(this: Printer, node: t.SequenceExpression) {\n this.printList(node.expressions, node);\n}\n\nexport function ThisExpression(this: Printer) {\n this.word(\"this\");\n}\n\nexport function Super(this: Printer) {\n this.word(\"super\");\n}\n\nfunction isDecoratorMemberExpression(\n node: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n): boolean {\n switch (node.type) {\n case \"Identifier\":\n return true;\n case \"MemberExpression\":\n return (\n !node.computed &&\n node.property.type === \"Identifier\" &&\n isDecoratorMemberExpression(node.object)\n );\n default:\n return false;\n }\n}\nfunction shouldParenthesizeDecoratorExpression(\n node: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n) {\n if (node.type === \"ParenthesizedExpression\") {\n // We didn't check extra?.parenthesized here because we don't track decorators in needsParen\n return false;\n }\n return !isDecoratorMemberExpression(\n node.type === \"CallExpression\" ? node.callee : node,\n );\n}\n\nexport function Decorator(this: Printer, node: t.Decorator) {\n this.token(\"@\");\n const { expression } = node;\n if (shouldParenthesizeDecoratorExpression(expression)) {\n this.token(\"(\");\n this.print(expression, node);\n this.token(\")\");\n } else {\n this.print(expression, node);\n }\n this.newline();\n}\n\nexport function OptionalMemberExpression(\n this: Printer,\n node: t.OptionalMemberExpression,\n) {\n this.print(node.object, node);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe instead of typeof check specific literal types?\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n if (node.optional) {\n this.token(\"?.\");\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(node.property, node);\n this.token(\"]\");\n } else {\n if (!node.optional) {\n this.token(\".\");\n }\n this.print(node.property, node);\n }\n}\n\nexport function OptionalCallExpression(\n this: Printer,\n node: t.OptionalCallExpression,\n) {\n this.print(node.callee, node);\n\n this.print(node.typeParameters, node); // TS\n\n if (node.optional) {\n this.token(\"?.\");\n }\n\n this.print(node.typeArguments, node); // Flow\n\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.token(\")\");\n}\n\nexport function CallExpression(this: Printer, node: t.CallExpression) {\n this.print(node.callee, node);\n\n this.print(node.typeArguments, node); // Flow\n this.print(node.typeParameters, node); // TS\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.token(\")\");\n}\n\nexport function Import(this: Printer) {\n this.word(\"import\");\n}\n\nexport function AwaitExpression(this: Printer, node: t.AwaitExpression) {\n this.word(\"await\");\n\n if (node.argument) {\n this.space();\n this.printTerminatorless(node.argument, node, false);\n }\n}\n\nexport function YieldExpression(this: Printer, node: t.YieldExpression) {\n this.word(\"yield\", true);\n\n if (node.delegate) {\n this.token(\"*\");\n if (node.argument) {\n this.space();\n // line terminators are allowed after yield*\n this.print(node.argument, node);\n }\n } else {\n if (node.argument) {\n this.space();\n this.printTerminatorless(node.argument, node, false);\n }\n }\n}\n\nexport function EmptyStatement(this: Printer) {\n this.semicolon(true /* force */);\n}\n\nexport function ExpressionStatement(\n this: Printer,\n node: t.ExpressionStatement,\n) {\n this.print(node.expression, node);\n this.semicolon();\n}\n\nexport function AssignmentPattern(this: Printer, node: t.AssignmentPattern) {\n this.print(node.left, node);\n // @ts-expect-error todo(flow->ts) property present on some of the types in union but not all\n if (node.left.optional) this.token(\"?\");\n // @ts-expect-error todo(flow->ts) property present on some of the types in union but not all\n this.print(node.left.typeAnnotation, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n}\n\nexport function AssignmentExpression(\n this: Printer,\n node: t.AssignmentExpression,\n parent: t.Node,\n) {\n // Somewhere inside a for statement `init` node but doesn't usually\n // needs a paren except for `in` expressions: `for (a in b ? a : b;;)`\n const parens =\n this.inForStatementInitCounter &&\n node.operator === \"in\" &&\n !n.needsParens(node, parent);\n\n if (parens) {\n this.token(\"(\");\n }\n\n this.print(node.left, node);\n\n this.space();\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n this.word(node.operator);\n } else {\n this.token(node.operator);\n }\n this.space();\n\n this.print(node.right, node);\n\n if (parens) {\n this.token(\")\");\n }\n}\n\nexport function BindExpression(this: Printer, node: t.BindExpression) {\n this.print(node.object, node);\n this.token(\"::\");\n this.print(node.callee, node);\n}\n\nexport {\n AssignmentExpression as BinaryExpression,\n AssignmentExpression as LogicalExpression,\n};\n\nexport function MemberExpression(this: Printer, node: t.MemberExpression) {\n this.print(node.object, node);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe use specific literal types\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(node.property, node);\n this.token(\"]\");\n } else {\n this.token(\".\");\n this.print(node.property, node);\n }\n}\n\nexport function MetaProperty(this: Printer, node: t.MetaProperty) {\n this.print(node.meta, node);\n this.token(\".\");\n this.print(node.property, node);\n}\n\nexport function PrivateName(this: Printer, node: t.PrivateName) {\n this.token(\"#\");\n this.print(node.id, node);\n}\n\nexport function V8IntrinsicIdentifier(\n this: Printer,\n node: t.V8IntrinsicIdentifier,\n) {\n this.token(\"%\");\n this.word(node.name);\n}\n\nexport function ModuleExpression(this: Printer, node: t.ModuleExpression) {\n this.word(\"module\", true);\n this.space();\n this.token(\"{\");\n this.indent();\n const { body } = node;\n if (body.body.length || body.directives.length) {\n this.newline();\n }\n this.print(body, node);\n this.dedent();\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n this.rightBrace();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAOA;AAA6B;EAN3BA,gBAAgB;EAChBC,SAAS;EACTC,kBAAkB;EAClBC;AAAe;AAKV,SAASC,eAAe,CAAgBC,IAAuB,EAAE;EACtE,IACEA,IAAI,CAACC,QAAQ,KAAK,MAAM,IACxBD,IAAI,CAACC,QAAQ,KAAK,QAAQ,IAC1BD,IAAI,CAACC,QAAQ,KAAK,QAAQ;EAE1BD,IAAI,CAACC,QAAQ,KAAK,OAAO,EACzB;IACA,IAAI,CAACC,IAAI,CAACF,IAAI,CAACC,QAAQ,CAAC;IACxB,IAAI,CAACE,KAAK,EAAE;EACd,CAAC,MAAM;IACL,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACC,QAAQ,CAAC;EAC3B;EAEA,IAAI,CAACI,KAAK,CAACL,IAAI,CAACM,QAAQ,EAAEN,IAAI,CAAC;AACjC;AAEO,SAASO,YAAY,CAAgBP,IAAoB,EAAE;EAChE,IAAIA,IAAI,CAACQ,KAAK,EAAE;IACd,IAAI,CAACN,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;IACxB,IAAI,CAACC,KAAK,EAAE;EACd;EACA,IAAI,CAACD,IAAI,CAAC,IAAI,CAAC;EACf,IAAI,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AK;EACf,IAAI,CAACF,IAAI,CAACF,IAAI,CAACsE,IAAI,CAAC;AACtB;AAEO,SAASC,gBAAgB,CAAgBvE,IAAwB,EAAE;EACxE,IAAI,CAACE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;EACzB,IAAI,CAACC,KAAK,EAAE;EACZ,IAAI,CAACC,SAAK,KAAK;EACf,IAAI,CAACoE,MAAM,EAAE;EACb,MAAM;IAAE/D;EAAK,CAAC,GAAGT,IAAI;EACrB,IAAIS,IAAI,CAACA,IAAI,CAACgB,MAAM,IAAIhB,IAAI,CAACgE,UAAU,CAAChD,MAAM,EAAE;IAC9C,IAAI,CAACgB,OAAO,EAAE;EAChB;EACA,IAAI,CAACpC,KAAK,CAACI,IAAI,EAAET,IAAI,CAAC;EACtB,IAAI,CAAC0E,MAAM,EAAE;EACb,IAAI,CAACC,gBAAgB,CAAC,KAAK,EAAE3E,IAAI,CAAC4E,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;EAC7C,IAAI,CAACC,UAAU,EAAE;AACnB"} \ No newline at end of file +{"version":3,"names":["_t","require","n","isCallExpression","isLiteral","isMemberExpression","isNewExpression","UnaryExpression","node","operator","word","space","token","print","argument","DoExpression","async","body","ParenthesizedExpression","expression","UpdateExpression","prefix","printTerminatorless","ConditionalExpression","test","consequent","alternate","NewExpression","parent","callee","format","minified","arguments","length","optional","typeArguments","typeParameters","printList","SequenceExpression","expressions","ThisExpression","Super","isDecoratorMemberExpression","type","computed","property","object","shouldParenthesizeDecoratorExpression","_shouldPrintDecoratorsBeforeExport","decoratorsBeforeExport","start","declaration","Decorator","newline","OptionalMemberExpression","TypeError","value","OptionalCallExpression","CallExpression","Import","AwaitExpression","YieldExpression","delegate","EmptyStatement","semicolon","ExpressionStatement","AssignmentPattern","left","typeAnnotation","right","AssignmentExpression","parens","inForStatementInitCounter","needsParens","BindExpression","MemberExpression","MetaProperty","meta","PrivateName","id","V8IntrinsicIdentifier","name","ModuleExpression","indent","directives","dedent","sourceWithOffset","loc","rightBrace"],"sources":["../../src/generators/expressions.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isCallExpression,\n isLiteral,\n isMemberExpression,\n isNewExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as n from \"../node\";\n\nexport function UnaryExpression(this: Printer, node: t.UnaryExpression) {\n if (\n node.operator === \"void\" ||\n node.operator === \"delete\" ||\n node.operator === \"typeof\" ||\n // throwExpressions\n node.operator === \"throw\"\n ) {\n this.word(node.operator);\n this.space();\n } else {\n this.token(node.operator);\n }\n\n this.print(node.argument, node);\n}\n\nexport function DoExpression(this: Printer, node: t.DoExpression) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n this.word(\"do\");\n this.space();\n this.print(node.body, node);\n}\n\nexport function ParenthesizedExpression(\n this: Printer,\n node: t.ParenthesizedExpression,\n) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.token(\")\");\n}\n\nexport function UpdateExpression(this: Printer, node: t.UpdateExpression) {\n if (node.prefix) {\n this.token(node.operator);\n this.print(node.argument, node);\n } else {\n this.printTerminatorless(node.argument, node, true);\n this.token(node.operator);\n }\n}\n\nexport function ConditionalExpression(\n this: Printer,\n node: t.ConditionalExpression,\n) {\n this.print(node.test, node);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.consequent, node);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.alternate, node);\n}\n\nexport function NewExpression(\n this: Printer,\n node: t.NewExpression,\n parent: t.Node,\n) {\n this.word(\"new\");\n this.space();\n this.print(node.callee, node);\n if (\n this.format.minified &&\n node.arguments.length === 0 &&\n !node.optional &&\n !isCallExpression(parent, { callee: node }) &&\n !isMemberExpression(parent) &&\n !isNewExpression(parent)\n ) {\n return;\n }\n\n this.print(node.typeArguments, node); // Flow\n this.print(node.typeParameters, node); // TS\n\n if (node.optional) {\n // TODO: This can never happen\n this.token(\"?.\");\n }\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.token(\")\");\n}\n\nexport function SequenceExpression(this: Printer, node: t.SequenceExpression) {\n this.printList(node.expressions, node);\n}\n\nexport function ThisExpression(this: Printer) {\n this.word(\"this\");\n}\n\nexport function Super(this: Printer) {\n this.word(\"super\");\n}\n\nfunction isDecoratorMemberExpression(\n node: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n): boolean {\n switch (node.type) {\n case \"Identifier\":\n return true;\n case \"MemberExpression\":\n return (\n !node.computed &&\n node.property.type === \"Identifier\" &&\n isDecoratorMemberExpression(node.object)\n );\n default:\n return false;\n }\n}\nfunction shouldParenthesizeDecoratorExpression(\n node: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n) {\n if (node.type === \"ParenthesizedExpression\") {\n // We didn't check extra?.parenthesized here because we don't track decorators in needsParen\n return false;\n }\n return !isDecoratorMemberExpression(\n node.type === \"CallExpression\" ? node.callee : node,\n );\n}\n\nexport function _shouldPrintDecoratorsBeforeExport(\n this: Printer,\n node: t.ExportDeclaration & { declaration: t.ClassDeclaration },\n) {\n if (typeof this.format.decoratorsBeforeExport === \"boolean\") {\n return this.format.decoratorsBeforeExport;\n }\n return (\n typeof node.start === \"number\" && node.start === node.declaration.start\n );\n}\n\nexport function Decorator(this: Printer, node: t.Decorator) {\n this.token(\"@\");\n const { expression } = node;\n if (shouldParenthesizeDecoratorExpression(expression)) {\n this.token(\"(\");\n this.print(expression, node);\n this.token(\")\");\n } else {\n this.print(expression, node);\n }\n this.newline();\n}\n\nexport function OptionalMemberExpression(\n this: Printer,\n node: t.OptionalMemberExpression,\n) {\n this.print(node.object, node);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe instead of typeof check specific literal types?\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n if (node.optional) {\n this.token(\"?.\");\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(node.property, node);\n this.token(\"]\");\n } else {\n if (!node.optional) {\n this.token(\".\");\n }\n this.print(node.property, node);\n }\n}\n\nexport function OptionalCallExpression(\n this: Printer,\n node: t.OptionalCallExpression,\n) {\n this.print(node.callee, node);\n\n this.print(node.typeParameters, node); // TS\n\n if (node.optional) {\n this.token(\"?.\");\n }\n\n this.print(node.typeArguments, node); // Flow\n\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.token(\")\");\n}\n\nexport function CallExpression(this: Printer, node: t.CallExpression) {\n this.print(node.callee, node);\n\n this.print(node.typeArguments, node); // Flow\n this.print(node.typeParameters, node); // TS\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.token(\")\");\n}\n\nexport function Import(this: Printer) {\n this.word(\"import\");\n}\n\nexport function AwaitExpression(this: Printer, node: t.AwaitExpression) {\n this.word(\"await\");\n\n if (node.argument) {\n this.space();\n this.printTerminatorless(node.argument, node, false);\n }\n}\n\nexport function YieldExpression(this: Printer, node: t.YieldExpression) {\n this.word(\"yield\", true);\n\n if (node.delegate) {\n this.token(\"*\");\n if (node.argument) {\n this.space();\n // line terminators are allowed after yield*\n this.print(node.argument, node);\n }\n } else {\n if (node.argument) {\n this.space();\n this.printTerminatorless(node.argument, node, false);\n }\n }\n}\n\nexport function EmptyStatement(this: Printer) {\n this.semicolon(true /* force */);\n}\n\nexport function ExpressionStatement(\n this: Printer,\n node: t.ExpressionStatement,\n) {\n this.print(node.expression, node);\n this.semicolon();\n}\n\nexport function AssignmentPattern(this: Printer, node: t.AssignmentPattern) {\n this.print(node.left, node);\n // @ts-expect-error todo(flow->ts) property present on some of the types in union but not all\n if (node.left.optional) this.token(\"?\");\n // @ts-expect-error todo(flow->ts) property present on some of the types in union but not all\n this.print(node.left.typeAnnotation, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n}\n\nexport function AssignmentExpression(\n this: Printer,\n node: t.AssignmentExpression,\n parent: t.Node,\n) {\n // Somewhere inside a for statement `init` node but doesn't usually\n // needs a paren except for `in` expressions: `for (a in b ? a : b;;)`\n const parens =\n this.inForStatementInitCounter &&\n node.operator === \"in\" &&\n !n.needsParens(node, parent);\n\n if (parens) {\n this.token(\"(\");\n }\n\n this.print(node.left, node);\n\n this.space();\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n this.word(node.operator);\n } else {\n this.token(node.operator);\n }\n this.space();\n\n this.print(node.right, node);\n\n if (parens) {\n this.token(\")\");\n }\n}\n\nexport function BindExpression(this: Printer, node: t.BindExpression) {\n this.print(node.object, node);\n this.token(\"::\");\n this.print(node.callee, node);\n}\n\nexport {\n AssignmentExpression as BinaryExpression,\n AssignmentExpression as LogicalExpression,\n};\n\nexport function MemberExpression(this: Printer, node: t.MemberExpression) {\n this.print(node.object, node);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe use specific literal types\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(node.property, node);\n this.token(\"]\");\n } else {\n this.token(\".\");\n this.print(node.property, node);\n }\n}\n\nexport function MetaProperty(this: Printer, node: t.MetaProperty) {\n this.print(node.meta, node);\n this.token(\".\");\n this.print(node.property, node);\n}\n\nexport function PrivateName(this: Printer, node: t.PrivateName) {\n this.token(\"#\");\n this.print(node.id, node);\n}\n\nexport function V8IntrinsicIdentifier(\n this: Printer,\n node: t.V8IntrinsicIdentifier,\n) {\n this.token(\"%\");\n this.word(node.name);\n}\n\nexport function ModuleExpression(this: Printer, node: t.ModuleExpression) {\n this.word(\"module\", true);\n this.space();\n this.token(\"{\");\n this.indent();\n const { body } = node;\n if (body.body.length || body.directives.length) {\n this.newline();\n }\n this.print(body, node);\n this.dedent();\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n this.rightBrace();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EA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gBA,CAAgB1E,IAAwB,EAAE;EACxE,IAAI,CAACE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;EACzB,IAAI,CAACC,KAAK,EAAE;EACZ,IAAI,CAACC,SAAK,KAAK;EACf,IAAI,CAACuE,MAAM,EAAE;EACb,MAAM;IAAElE;EAAK,CAAC,GAAGT,IAAI;EACrB,IAAIS,IAAI,CAACA,IAAI,CAACgB,MAAM,IAAIhB,IAAI,CAACmE,UAAU,CAACnD,MAAM,EAAE;IAC9C,IAAI,CAACoB,OAAO,EAAE;EAChB;EACA,IAAI,CAACxC,KAAK,CAACI,IAAI,EAAET,IAAI,CAAC;EACtB,IAAI,CAAC6E,MAAM,EAAE;EACb,IAAI,CAACC,gBAAgB,CAAC,KAAK,EAAE9E,IAAI,CAAC+E,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;EAC7C,IAAI,CAACC,UAAU,EAAE;AACnB"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/flow.js b/node_modules/@babel/generator/lib/generators/flow.js index bde042c1b..2f245af4a 100644 --- a/node_modules/@babel/generator/lib/generators/flow.js +++ b/node_modules/@babel/generator/lib/generators/flow.js @@ -335,7 +335,6 @@ function FunctionTypeAnnotation(node, parent) { this.print(node.rest, node); } this.tokenChar(41); - if (parent && (parent.type === "ObjectTypeCallProperty" || parent.type === "ObjectTypeInternalSlot" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method)) { this.tokenChar(58); } else { @@ -508,7 +507,6 @@ function ObjectTypeAnnotation(node) { } else { this.tokenChar(123); } - const props = [...node.properties, ...(node.callProperties || []), ...(node.indexers || []), ...(node.internalSlots || [])]; if (props.length) { this.newline(); diff --git a/node_modules/@babel/generator/lib/generators/flow.js.map b/node_modules/@babel/generator/lib/generators/flow.js.map index 5edf9ee1b..209ea1a53 100644 --- a/node_modules/@babel/generator/lib/generators/flow.js.map +++ b/node_modules/@babel/generator/lib/generators/flow.js.map @@ -1 +1 @@ -{"version":3,"names":["isDeclareExportDeclaration","isStatement","AnyTypeAnnotation","word","ArrayTypeAnnotation","node","print","elementType","token","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","value","NullLiteralTypeAnnotation","DeclareClass","parent","space","_interfaceish","DeclareFunction","id","typeAnnotation","predicate","semicolon","InferredPredicate","DeclaredPredicate","DeclareInterface","InterfaceDeclaration","DeclareModule","body","DeclareModuleExports","DeclareTypeAlias","TypeAlias","DeclareOpaqueType","OpaqueType","DeclareVariable","DeclareExportDeclaration","default","FlowExportDeclaration","call","DeclareExportAllDeclaration","ExportAllDeclaration","EnumDeclaration","enumExplicitType","context","name","hasExplicitType","enumBody","members","indent","newline","member","hasUnknownMembers","dedent","EnumBooleanBody","explicitType","EnumNumberBody","EnumStringBody","EnumSymbolBody","EnumDefaultedMember","enumInitializedMember","init","EnumBooleanMember","EnumNumberMember","EnumStringMember","declaration","declar","specifiers","length","printList","source","ExistsTypeAnnotation","FunctionTypeAnnotation","typeParameters","this","params","rest","type","method","returnType","FunctionTypeParam","optional","InterfaceExtends","extends","mixins","implements","_variance","variance","kind","andSeparator","InterfaceTypeAnnotation","IntersectionTypeAnnotation","printJoin","types","separator","MixedTypeAnnotation","EmptyTypeAnnotation","NullableTypeAnnotation","NumberTypeAnnotation","StringTypeAnnotation","ThisTypeAnnotation","TupleTypeAnnotation","TypeofTypeAnnotation","argument","right","TypeAnnotation","TypeParameterInstantiation","TypeParameter","bound","supertype","impltype","ObjectTypeAnnotation","exact","props","properties","callProperties","indexers","internalSlots","addNewlines","leading","statement","iterator","inexact","ObjectTypeInternalSlot","static","ObjectTypeCallProperty","ObjectTypeIndexer","key","ObjectTypeProperty","proto","ObjectTypeSpreadProperty","QualifiedTypeIdentifier","qualification","SymbolTypeAnnotation","orSeparator","UnionTypeAnnotation","TypeCastExpression","expression","Variance","VoidTypeAnnotation","IndexedAccessType","objectType","indexType","OptionalIndexedAccessType"],"sources":["../../src/generators/flow.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isDeclareExportDeclaration, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { ExportAllDeclaration } from \"./modules\";\n\nexport function AnyTypeAnnotation(this: Printer) {\n this.word(\"any\");\n}\n\nexport function ArrayTypeAnnotation(\n this: Printer,\n node: t.ArrayTypeAnnotation,\n) {\n this.print(node.elementType, node, true);\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function BooleanTypeAnnotation(this: Printer) {\n this.word(\"boolean\");\n}\n\nexport function BooleanLiteralTypeAnnotation(\n this: Printer,\n node: t.BooleanLiteralTypeAnnotation,\n) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteralTypeAnnotation(this: Printer) {\n this.word(\"null\");\n}\n\nexport function DeclareClass(\n this: Printer,\n node: t.DeclareClass,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"class\");\n this.space();\n this._interfaceish(node);\n}\n\nexport function DeclareFunction(\n this: Printer,\n node: t.DeclareFunction,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"function\");\n this.space();\n this.print(node.id, node);\n // @ts-ignore(Babel 7 vs Babel 8) TODO(Babel 8) Remove this comment, since we'll remove the Noop node\n this.print(node.id.typeAnnotation.typeAnnotation, node);\n\n if (node.predicate) {\n this.space();\n this.print(node.predicate, node);\n }\n\n this.semicolon();\n}\n\nexport function InferredPredicate(this: Printer) {\n this.token(\"%\");\n this.word(\"checks\");\n}\n\nexport function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) {\n this.token(\"%\");\n this.word(\"checks\");\n this.token(\"(\");\n this.print(node.value, node);\n this.token(\")\");\n}\n\nexport function DeclareInterface(this: Printer, node: t.DeclareInterface) {\n this.word(\"declare\");\n this.space();\n this.InterfaceDeclaration(node);\n}\n\nexport function DeclareModule(this: Printer, node: t.DeclareModule) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.space();\n this.print(node.id, node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function DeclareModuleExports(\n this: Printer,\n node: t.DeclareModuleExports,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.token(\".\");\n this.word(\"exports\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) {\n this.word(\"declare\");\n this.space();\n this.TypeAlias(node);\n}\n\nexport function DeclareOpaqueType(\n this: Printer,\n node: t.DeclareOpaqueType,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.OpaqueType(node);\n}\n\nexport function DeclareVariable(\n this: Printer,\n node: t.DeclareVariable,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"var\");\n this.space();\n this.print(node.id, node);\n this.print(node.id.typeAnnotation, node);\n this.semicolon();\n}\n\nexport function DeclareExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"export\");\n this.space();\n if (node.default) {\n this.word(\"default\");\n this.space();\n }\n\n FlowExportDeclaration.call(this, node);\n}\n\nexport function DeclareExportAllDeclaration(\n this: Printer,\n node: t.DeclareExportAllDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n ExportAllDeclaration.call(this, node);\n}\n\nexport function EnumDeclaration(this: Printer, node: t.EnumDeclaration) {\n const { id, body } = node;\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.print(body, node);\n}\n\nfunction enumExplicitType(\n context: Printer,\n name: string,\n hasExplicitType: boolean,\n) {\n if (hasExplicitType) {\n context.space();\n context.word(\"of\");\n context.space();\n context.word(name);\n }\n context.space();\n}\n\nfunction enumBody(context: Printer, node: t.EnumBody) {\n const { members } = node;\n context.token(\"{\");\n context.indent();\n context.newline();\n for (const member of members) {\n context.print(member, node);\n context.newline();\n }\n if (node.hasUnknownMembers) {\n context.token(\"...\");\n context.newline();\n }\n context.dedent();\n context.token(\"}\");\n}\n\nexport function EnumBooleanBody(this: Printer, node: t.EnumBooleanBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"boolean\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumNumberBody(this: Printer, node: t.EnumNumberBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"number\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumStringBody(this: Printer, node: t.EnumStringBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"string\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumSymbolBody(this: Printer, node: t.EnumSymbolBody) {\n enumExplicitType(this, \"symbol\", true);\n enumBody(this, node);\n}\n\nexport function EnumDefaultedMember(\n this: Printer,\n node: t.EnumDefaultedMember,\n) {\n const { id } = node;\n this.print(id, node);\n this.token(\",\");\n}\n\nfunction enumInitializedMember(\n context: Printer,\n node: t.EnumBooleanMember | t.EnumNumberMember | t.EnumStringMember,\n) {\n const { id, init } = node;\n context.print(id, node);\n context.space();\n context.token(\"=\");\n context.space();\n context.print(init, node);\n context.token(\",\");\n}\n\nexport function EnumBooleanMember(this: Printer, node: t.EnumBooleanMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumNumberMember(this: Printer, node: t.EnumNumberMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumStringMember(this: Printer, node: t.EnumStringMember) {\n enumInitializedMember(this, node);\n}\n\nfunction FlowExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n this.token(\"{\");\n if (node.specifiers.length) {\n this.space();\n this.printList(node.specifiers, node);\n this.space();\n }\n this.token(\"}\");\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n this.print(node.source, node);\n }\n\n this.semicolon();\n }\n}\n\nexport function ExistsTypeAnnotation(this: Printer) {\n this.token(\"*\");\n}\n\nexport function FunctionTypeAnnotation(\n this: Printer,\n node: t.FunctionTypeAnnotation,\n parent: t.Node | void,\n) {\n this.print(node.typeParameters, node);\n this.token(\"(\");\n\n if (node.this) {\n this.word(\"this\");\n this.token(\":\");\n this.space();\n this.print(node.this.typeAnnotation, node);\n if (node.params.length || node.rest) {\n this.token(\",\");\n this.space();\n }\n }\n\n this.printList(node.params, node);\n\n if (node.rest) {\n if (node.params.length) {\n this.token(\",\");\n this.space();\n }\n this.token(\"...\");\n this.print(node.rest, node);\n }\n\n this.token(\")\");\n\n // this node type is overloaded, not sure why but it makes it EXTREMELY annoying\n if (\n parent &&\n (parent.type === \"ObjectTypeCallProperty\" ||\n parent.type === \"ObjectTypeInternalSlot\" ||\n parent.type === \"DeclareFunction\" ||\n (parent.type === \"ObjectTypeProperty\" && parent.method))\n ) {\n this.token(\":\");\n } else {\n this.space();\n this.token(\"=>\");\n }\n\n this.space();\n this.print(node.returnType, node);\n}\n\nexport function FunctionTypeParam(this: Printer, node: t.FunctionTypeParam) {\n this.print(node.name, node);\n if (node.optional) this.token(\"?\");\n if (node.name) {\n this.token(\":\");\n this.space();\n }\n this.print(node.typeAnnotation, node);\n}\n\nexport function InterfaceExtends(this: Printer, node: t.InterfaceExtends) {\n this.print(node.id, node);\n this.print(node.typeParameters, node, true);\n}\n\nexport {\n InterfaceExtends as ClassImplements,\n InterfaceExtends as GenericTypeAnnotation,\n};\n\nexport function _interfaceish(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface | t.DeclareClass,\n) {\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n if (node.mixins && node.mixins.length) {\n this.space();\n this.word(\"mixins\");\n this.space();\n this.printList(node.mixins, node);\n }\n if (node.implements && node.implements.length) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function _variance(\n this: Printer,\n node:\n | t.TypeParameter\n | t.ObjectTypeIndexer\n | t.ObjectTypeProperty\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty,\n) {\n if (node.variance) {\n if (node.variance.kind === \"plus\") {\n this.token(\"+\");\n } else if (node.variance.kind === \"minus\") {\n this.token(\"-\");\n }\n }\n}\n\nexport function InterfaceDeclaration(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface,\n) {\n this.word(\"interface\");\n this.space();\n this._interfaceish(node);\n}\n\nfunction andSeparator(this: Printer) {\n this.space();\n this.token(\"&\");\n this.space();\n}\n\nexport function InterfaceTypeAnnotation(\n this: Printer,\n node: t.InterfaceTypeAnnotation,\n) {\n this.word(\"interface\");\n if (node.extends && node.extends.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function IntersectionTypeAnnotation(\n this: Printer,\n node: t.IntersectionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: andSeparator });\n}\n\nexport function MixedTypeAnnotation(this: Printer) {\n this.word(\"mixed\");\n}\n\nexport function EmptyTypeAnnotation(this: Printer) {\n this.word(\"empty\");\n}\n\nexport function NullableTypeAnnotation(\n this: Printer,\n node: t.NullableTypeAnnotation,\n) {\n this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport {\n NumericLiteral as NumberLiteralTypeAnnotation,\n StringLiteral as StringLiteralTypeAnnotation,\n} from \"./types\";\n\nexport function NumberTypeAnnotation(this: Printer) {\n this.word(\"number\");\n}\n\nexport function StringTypeAnnotation(this: Printer) {\n this.word(\"string\");\n}\n\nexport function ThisTypeAnnotation(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TupleTypeAnnotation(\n this: Printer,\n node: t.TupleTypeAnnotation,\n) {\n this.token(\"[\");\n this.printList(node.types, node);\n this.token(\"]\");\n}\n\nexport function TypeofTypeAnnotation(\n this: Printer,\n node: t.TypeofTypeAnnotation,\n) {\n this.word(\"typeof\");\n this.space();\n this.print(node.argument, node);\n}\n\nexport function TypeAlias(\n this: Printer,\n node: t.TypeAlias | t.DeclareTypeAlias,\n) {\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n this.semicolon();\n}\n\nexport function TypeAnnotation(this: Printer, node: t.TypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TypeParameterInstantiation(\n this: Printer,\n node: t.TypeParameterInstantiation,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n this.token(\">\");\n}\n\nexport { TypeParameterInstantiation as TypeParameterDeclaration };\n\nexport function TypeParameter(this: Printer, node: t.TypeParameter) {\n this._variance(node);\n\n this.word(node.name);\n\n if (node.bound) {\n this.print(node.bound, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function OpaqueType(\n this: Printer,\n node: t.OpaqueType | t.DeclareOpaqueType,\n) {\n this.word(\"opaque\");\n this.space();\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.supertype) {\n this.token(\":\");\n this.space();\n this.print(node.supertype, node);\n }\n\n if (node.impltype) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.impltype, node);\n }\n this.semicolon();\n}\n\nexport function ObjectTypeAnnotation(\n this: Printer,\n node: t.ObjectTypeAnnotation,\n) {\n if (node.exact) {\n this.token(\"{|\");\n } else {\n this.token(\"{\");\n }\n\n // TODO: remove the array fallbacks and instead enforce the types to require an array\n const props = [\n ...node.properties,\n ...(node.callProperties || []),\n ...(node.indexers || []),\n ...(node.internalSlots || []),\n ];\n\n if (props.length) {\n this.newline();\n\n this.space();\n\n this.printJoin(props, node, {\n addNewlines(leading) {\n if (leading && !props[0]) return 1;\n },\n indent: true,\n statement: true,\n iterator: () => {\n if (props.length !== 1 || node.inexact) {\n this.token(\",\");\n this.space();\n }\n },\n });\n\n this.space();\n }\n\n if (node.inexact) {\n this.indent();\n this.token(\"...\");\n if (props.length) {\n this.newline();\n }\n this.dedent();\n }\n\n if (node.exact) {\n this.token(\"|}\");\n } else {\n this.token(\"}\");\n }\n}\n\nexport function ObjectTypeInternalSlot(\n this: Printer,\n node: t.ObjectTypeInternalSlot,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.token(\"[\");\n this.token(\"[\");\n this.print(node.id, node);\n this.token(\"]\");\n this.token(\"]\");\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeCallProperty(\n this: Printer,\n node: t.ObjectTypeCallProperty,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this._variance(node);\n this.token(\"[\");\n if (node.id) {\n this.print(node.id, node);\n this.token(\":\");\n this.space();\n }\n this.print(node.key, node);\n this.token(\"]\");\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) {\n if (node.proto) {\n this.word(\"proto\");\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.kind === \"get\" || node.kind === \"set\") {\n this.word(node.kind);\n this.space();\n }\n this._variance(node);\n this.print(node.key, node);\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeSpreadProperty(\n this: Printer,\n node: t.ObjectTypeSpreadProperty,\n) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport function QualifiedTypeIdentifier(\n this: Printer,\n node: t.QualifiedTypeIdentifier,\n) {\n this.print(node.qualification, node);\n this.token(\".\");\n this.print(node.id, node);\n}\n\nexport function SymbolTypeAnnotation(this: Printer) {\n this.word(\"symbol\");\n}\n\nfunction orSeparator(this: Printer) {\n this.space();\n this.token(\"|\");\n this.space();\n}\n\nexport function UnionTypeAnnotation(\n this: Printer,\n node: t.UnionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: orSeparator });\n}\n\nexport function TypeCastExpression(this: Printer, node: t.TypeCastExpression) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function Variance(this: Printer, node: t.Variance) {\n if (node.kind === \"plus\") {\n this.token(\"+\");\n } else {\n this.token(\"-\");\n }\n}\n\nexport function VoidTypeAnnotation(this: Printer) {\n this.word(\"void\");\n}\n\nexport function IndexedAccessType(this: Printer, node: t.IndexedAccessType) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function OptionalIndexedAccessType(\n this: Printer,\n node: t.OptionalIndexedAccessType,\n) {\n this.print(node.objectType, node);\n if (node.optional) {\n this.token(\"?.\");\n }\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAEA;AAidA;AAGiB;EAtdRA,0BAA0B;EAAEC;AAAW;AAIzC,SAASC,iBAAiB,GAAgB;EAC/C,IAAI,CAACC,IAAI,CAAC,KAAK,CAAC;AAClB;AAEO,SAASC,mBAAmB,CAEjCC,IAA2B,EAC3B;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,WAAW,EAAEF,IAAI,EAAE,IAAI,CAAC;EACxC,IAAI,CAACG,SAAK,IAAK;EACf,IAAI,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AK,IAAK;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAACuI,SAAS,EAAEvI,IAAI,CAAC;EAChC,IAAI,CAACG,SAAK,IAAK;AACjB;AAEO,SAASqI,yBAAyB,CAEvCxI,IAAiC,EACjC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACsI,UAAU,EAAEtI,IAAI,CAAC;EACjC,IAAIA,IAAI,CAAC0E,QAAQ,EAAE;IACjB,IAAI,CAACvE,KAAK,CAAC,IAAI,CAAC;EAClB;EACA,IAAI,CAACA,SAAK,IAAK;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAACuI,SAAS,EAAEvI,IAAI,CAAC;EAChC,IAAI,CAACG,SAAK,IAAK;AACjB"} \ No newline at end of file +{"version":3,"names":["_t","require","_modules","_types2","isDeclareExportDeclaration","isStatement","AnyTypeAnnotation","word","ArrayTypeAnnotation","node","print","elementType","token","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","value","NullLiteralTypeAnnotation","DeclareClass","parent","space","_interfaceish","DeclareFunction","id","typeAnnotation","predicate","semicolon","InferredPredicate","DeclaredPredicate","DeclareInterface","InterfaceDeclaration","DeclareModule","body","DeclareModuleExports","DeclareTypeAlias","TypeAlias","DeclareOpaqueType","OpaqueType","DeclareVariable","DeclareExportDeclaration","default","FlowExportDeclaration","call","DeclareExportAllDeclaration","ExportAllDeclaration","EnumDeclaration","enumExplicitType","context","name","hasExplicitType","enumBody","members","indent","newline","member","hasUnknownMembers","dedent","EnumBooleanBody","explicitType","EnumNumberBody","EnumStringBody","EnumSymbolBody","EnumDefaultedMember","enumInitializedMember","init","EnumBooleanMember","EnumNumberMember","EnumStringMember","declaration","declar","specifiers","length","printList","source","ExistsTypeAnnotation","FunctionTypeAnnotation","typeParameters","this","params","rest","type","method","returnType","FunctionTypeParam","optional","InterfaceExtends","_node$extends","extends","mixins","implements","_variance","variance","kind","andSeparator","InterfaceTypeAnnotation","IntersectionTypeAnnotation","printJoin","types","separator","MixedTypeAnnotation","EmptyTypeAnnotation","NullableTypeAnnotation","NumberTypeAnnotation","StringTypeAnnotation","ThisTypeAnnotation","TupleTypeAnnotation","TypeofTypeAnnotation","argument","right","TypeAnnotation","TypeParameterInstantiation","TypeParameter","bound","supertype","impltype","ObjectTypeAnnotation","exact","props","properties","callProperties","indexers","internalSlots","addNewlines","leading","statement","iterator","inexact","ObjectTypeInternalSlot","static","ObjectTypeCallProperty","ObjectTypeIndexer","key","ObjectTypeProperty","proto","ObjectTypeSpreadProperty","QualifiedTypeIdentifier","qualification","SymbolTypeAnnotation","orSeparator","UnionTypeAnnotation","TypeCastExpression","expression","Variance","VoidTypeAnnotation","IndexedAccessType","objectType","indexType","OptionalIndexedAccessType"],"sources":["../../src/generators/flow.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isDeclareExportDeclaration, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { ExportAllDeclaration } from \"./modules\";\n\nexport function AnyTypeAnnotation(this: Printer) {\n this.word(\"any\");\n}\n\nexport function ArrayTypeAnnotation(\n this: Printer,\n node: t.ArrayTypeAnnotation,\n) {\n this.print(node.elementType, node, true);\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function BooleanTypeAnnotation(this: Printer) {\n this.word(\"boolean\");\n}\n\nexport function BooleanLiteralTypeAnnotation(\n this: Printer,\n node: t.BooleanLiteralTypeAnnotation,\n) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteralTypeAnnotation(this: Printer) {\n this.word(\"null\");\n}\n\nexport function DeclareClass(\n this: Printer,\n node: t.DeclareClass,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"class\");\n this.space();\n this._interfaceish(node);\n}\n\nexport function DeclareFunction(\n this: Printer,\n node: t.DeclareFunction,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"function\");\n this.space();\n this.print(node.id, node);\n // @ts-ignore(Babel 7 vs Babel 8) TODO(Babel 8) Remove this comment, since we'll remove the Noop node\n this.print(node.id.typeAnnotation.typeAnnotation, node);\n\n if (node.predicate) {\n this.space();\n this.print(node.predicate, node);\n }\n\n this.semicolon();\n}\n\nexport function InferredPredicate(this: Printer) {\n this.token(\"%\");\n this.word(\"checks\");\n}\n\nexport function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) {\n this.token(\"%\");\n this.word(\"checks\");\n this.token(\"(\");\n this.print(node.value, node);\n this.token(\")\");\n}\n\nexport function DeclareInterface(this: Printer, node: t.DeclareInterface) {\n this.word(\"declare\");\n this.space();\n this.InterfaceDeclaration(node);\n}\n\nexport function DeclareModule(this: Printer, node: t.DeclareModule) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.space();\n this.print(node.id, node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function DeclareModuleExports(\n this: Printer,\n node: t.DeclareModuleExports,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.token(\".\");\n this.word(\"exports\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) {\n this.word(\"declare\");\n this.space();\n this.TypeAlias(node);\n}\n\nexport function DeclareOpaqueType(\n this: Printer,\n node: t.DeclareOpaqueType,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.OpaqueType(node);\n}\n\nexport function DeclareVariable(\n this: Printer,\n node: t.DeclareVariable,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"var\");\n this.space();\n this.print(node.id, node);\n this.print(node.id.typeAnnotation, node);\n this.semicolon();\n}\n\nexport function DeclareExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"export\");\n this.space();\n if (node.default) {\n this.word(\"default\");\n this.space();\n }\n\n FlowExportDeclaration.call(this, node);\n}\n\nexport function DeclareExportAllDeclaration(\n this: Printer,\n node: t.DeclareExportAllDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n ExportAllDeclaration.call(this, node);\n}\n\nexport function EnumDeclaration(this: Printer, node: t.EnumDeclaration) {\n const { id, body } = node;\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.print(body, node);\n}\n\nfunction enumExplicitType(\n context: Printer,\n name: string,\n hasExplicitType: boolean,\n) {\n if (hasExplicitType) {\n context.space();\n context.word(\"of\");\n context.space();\n context.word(name);\n }\n context.space();\n}\n\nfunction enumBody(context: Printer, node: t.EnumBody) {\n const { members } = node;\n context.token(\"{\");\n context.indent();\n context.newline();\n for (const member of members) {\n context.print(member, node);\n context.newline();\n }\n if (node.hasUnknownMembers) {\n context.token(\"...\");\n context.newline();\n }\n context.dedent();\n context.token(\"}\");\n}\n\nexport function EnumBooleanBody(this: Printer, node: t.EnumBooleanBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"boolean\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumNumberBody(this: Printer, node: t.EnumNumberBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"number\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumStringBody(this: Printer, node: t.EnumStringBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"string\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumSymbolBody(this: Printer, node: t.EnumSymbolBody) {\n enumExplicitType(this, \"symbol\", true);\n enumBody(this, node);\n}\n\nexport function EnumDefaultedMember(\n this: Printer,\n node: t.EnumDefaultedMember,\n) {\n const { id } = node;\n this.print(id, node);\n this.token(\",\");\n}\n\nfunction enumInitializedMember(\n context: Printer,\n node: t.EnumBooleanMember | t.EnumNumberMember | t.EnumStringMember,\n) {\n const { id, init } = node;\n context.print(id, node);\n context.space();\n context.token(\"=\");\n context.space();\n context.print(init, node);\n context.token(\",\");\n}\n\nexport function EnumBooleanMember(this: Printer, node: t.EnumBooleanMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumNumberMember(this: Printer, node: t.EnumNumberMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumStringMember(this: Printer, node: t.EnumStringMember) {\n enumInitializedMember(this, node);\n}\n\nfunction FlowExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n this.token(\"{\");\n if (node.specifiers.length) {\n this.space();\n this.printList(node.specifiers, node);\n this.space();\n }\n this.token(\"}\");\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n this.print(node.source, node);\n }\n\n this.semicolon();\n }\n}\n\nexport function ExistsTypeAnnotation(this: Printer) {\n this.token(\"*\");\n}\n\nexport function FunctionTypeAnnotation(\n this: Printer,\n node: t.FunctionTypeAnnotation,\n parent: t.Node | void,\n) {\n this.print(node.typeParameters, node);\n this.token(\"(\");\n\n if (node.this) {\n this.word(\"this\");\n this.token(\":\");\n this.space();\n this.print(node.this.typeAnnotation, node);\n if (node.params.length || node.rest) {\n this.token(\",\");\n this.space();\n }\n }\n\n this.printList(node.params, node);\n\n if (node.rest) {\n if (node.params.length) {\n this.token(\",\");\n this.space();\n }\n this.token(\"...\");\n this.print(node.rest, node);\n }\n\n this.token(\")\");\n\n // this node type is overloaded, not sure why but it makes it EXTREMELY annoying\n if (\n parent &&\n (parent.type === \"ObjectTypeCallProperty\" ||\n parent.type === \"ObjectTypeInternalSlot\" ||\n parent.type === \"DeclareFunction\" ||\n (parent.type === \"ObjectTypeProperty\" && parent.method))\n ) {\n this.token(\":\");\n } else {\n this.space();\n this.token(\"=>\");\n }\n\n this.space();\n this.print(node.returnType, node);\n}\n\nexport function FunctionTypeParam(this: Printer, node: t.FunctionTypeParam) {\n this.print(node.name, node);\n if (node.optional) this.token(\"?\");\n if (node.name) {\n this.token(\":\");\n this.space();\n }\n this.print(node.typeAnnotation, node);\n}\n\nexport function InterfaceExtends(this: Printer, node: t.InterfaceExtends) {\n this.print(node.id, node);\n this.print(node.typeParameters, node, true);\n}\n\nexport {\n InterfaceExtends as ClassImplements,\n InterfaceExtends as GenericTypeAnnotation,\n};\n\nexport function _interfaceish(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface | t.DeclareClass,\n) {\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n if (node.mixins && node.mixins.length) {\n this.space();\n this.word(\"mixins\");\n this.space();\n this.printList(node.mixins, node);\n }\n if (node.implements && node.implements.length) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function _variance(\n this: Printer,\n node:\n | t.TypeParameter\n | t.ObjectTypeIndexer\n | t.ObjectTypeProperty\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty,\n) {\n if (node.variance) {\n if (node.variance.kind === \"plus\") {\n this.token(\"+\");\n } else if (node.variance.kind === \"minus\") {\n this.token(\"-\");\n }\n }\n}\n\nexport function InterfaceDeclaration(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface,\n) {\n this.word(\"interface\");\n this.space();\n this._interfaceish(node);\n}\n\nfunction andSeparator(this: Printer) {\n this.space();\n this.token(\"&\");\n this.space();\n}\n\nexport function InterfaceTypeAnnotation(\n this: Printer,\n node: t.InterfaceTypeAnnotation,\n) {\n this.word(\"interface\");\n if (node.extends && node.extends.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function IntersectionTypeAnnotation(\n this: Printer,\n node: t.IntersectionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: andSeparator });\n}\n\nexport function MixedTypeAnnotation(this: Printer) {\n this.word(\"mixed\");\n}\n\nexport function EmptyTypeAnnotation(this: Printer) {\n this.word(\"empty\");\n}\n\nexport function NullableTypeAnnotation(\n this: Printer,\n node: t.NullableTypeAnnotation,\n) {\n this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport {\n NumericLiteral as NumberLiteralTypeAnnotation,\n StringLiteral as StringLiteralTypeAnnotation,\n} from \"./types\";\n\nexport function NumberTypeAnnotation(this: Printer) {\n this.word(\"number\");\n}\n\nexport function StringTypeAnnotation(this: Printer) {\n this.word(\"string\");\n}\n\nexport function ThisTypeAnnotation(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TupleTypeAnnotation(\n this: Printer,\n node: t.TupleTypeAnnotation,\n) {\n this.token(\"[\");\n this.printList(node.types, node);\n this.token(\"]\");\n}\n\nexport function TypeofTypeAnnotation(\n this: Printer,\n node: t.TypeofTypeAnnotation,\n) {\n this.word(\"typeof\");\n this.space();\n this.print(node.argument, node);\n}\n\nexport function TypeAlias(\n this: Printer,\n node: t.TypeAlias | t.DeclareTypeAlias,\n) {\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n this.semicolon();\n}\n\nexport function TypeAnnotation(this: Printer, node: t.TypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TypeParameterInstantiation(\n this: Printer,\n node: t.TypeParameterInstantiation,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n this.token(\">\");\n}\n\nexport { TypeParameterInstantiation as TypeParameterDeclaration };\n\nexport function TypeParameter(this: Printer, node: t.TypeParameter) {\n this._variance(node);\n\n this.word(node.name);\n\n if (node.bound) {\n this.print(node.bound, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function OpaqueType(\n this: Printer,\n node: t.OpaqueType | t.DeclareOpaqueType,\n) {\n this.word(\"opaque\");\n this.space();\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.supertype) {\n this.token(\":\");\n this.space();\n this.print(node.supertype, node);\n }\n\n if (node.impltype) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.impltype, node);\n }\n this.semicolon();\n}\n\nexport function ObjectTypeAnnotation(\n this: Printer,\n node: t.ObjectTypeAnnotation,\n) {\n if (node.exact) {\n this.token(\"{|\");\n } else {\n this.token(\"{\");\n }\n\n // TODO: remove the array fallbacks and instead enforce the types to require an array\n const props = [\n ...node.properties,\n ...(node.callProperties || []),\n ...(node.indexers || []),\n ...(node.internalSlots || []),\n ];\n\n if (props.length) {\n this.newline();\n\n this.space();\n\n this.printJoin(props, node, {\n addNewlines(leading) {\n if (leading && !props[0]) return 1;\n },\n indent: true,\n statement: true,\n iterator: () => {\n if (props.length !== 1 || node.inexact) {\n this.token(\",\");\n this.space();\n }\n },\n });\n\n this.space();\n }\n\n if (node.inexact) {\n this.indent();\n this.token(\"...\");\n if (props.length) {\n this.newline();\n }\n this.dedent();\n }\n\n if (node.exact) {\n this.token(\"|}\");\n } else {\n this.token(\"}\");\n }\n}\n\nexport function ObjectTypeInternalSlot(\n this: Printer,\n node: t.ObjectTypeInternalSlot,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.token(\"[\");\n this.token(\"[\");\n this.print(node.id, node);\n this.token(\"]\");\n this.token(\"]\");\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeCallProperty(\n this: Printer,\n node: t.ObjectTypeCallProperty,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this._variance(node);\n this.token(\"[\");\n if (node.id) {\n this.print(node.id, node);\n this.token(\":\");\n this.space();\n }\n this.print(node.key, node);\n this.token(\"]\");\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) {\n if (node.proto) {\n this.word(\"proto\");\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.kind === \"get\" || node.kind === \"set\") {\n this.word(node.kind);\n this.space();\n }\n this._variance(node);\n this.print(node.key, node);\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeSpreadProperty(\n this: Printer,\n node: t.ObjectTypeSpreadProperty,\n) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport function QualifiedTypeIdentifier(\n this: Printer,\n node: t.QualifiedTypeIdentifier,\n) {\n this.print(node.qualification, node);\n this.token(\".\");\n this.print(node.id, node);\n}\n\nexport function SymbolTypeAnnotation(this: Printer) {\n this.word(\"symbol\");\n}\n\nfunction orSeparator(this: Printer) {\n this.space();\n this.token(\"|\");\n this.space();\n}\n\nexport function UnionTypeAnnotation(\n this: Printer,\n node: t.UnionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: orSeparator });\n}\n\nexport function TypeCastExpression(this: Printer, node: t.TypeCastExpression) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function Variance(this: Printer, node: t.Variance) {\n if (node.kind === \"plus\") {\n this.token(\"+\");\n } else {\n this.token(\"-\");\n }\n}\n\nexport function VoidTypeAnnotation(this: Printer) {\n this.word(\"void\");\n}\n\nexport function IndexedAccessType(this: Printer, node: t.IndexedAccessType) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function OptionalIndexedAccessType(\n this: Printer,\n node: t.OptionalIndexedAccessType,\n) {\n this.print(node.objectType, node);\n if (node.optional) {\n this.token(\"?.\");\n }\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAidA,IAAAE,OAAA,GAAAF,OAAA;AAGiB;EAtdRG,0BAA0B;EAAEC;AAAW,IAAAL,EAAA;AAIzC,SAASM,iBAAiBA,CAAA,EAAgB;EAC/C,IAAI,CAACC,IAAI,CAAC,KAAK,CAAC;AAClB;AAEO,SAASC,mBAAmBA,CAEjCC,IAA2B,EAC3B;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,WAAW,EAAEF,IAAI,EAAE,IAAI,CAAC;EACxC,IAAI,CAACG,SAAK,IAAK;EACf,IAAI,CAACA,SAAK,IAAK;AACjB;AAEO,SAASC,qBAAqBA,CAAA,EAAgB;EACnD,IAAI,CAACN,IAAI,CAAC,SAAS,CAAC;AACtB;AAEO,SAASO,4BAA4BA,CAE1CL,IAAoC,EACpC;EACA,IAAI,CAACF,IAAI,CAACE,IAAI,CAACM,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAC1C;AAEO,SAASC,yBAAyBA,CAAA,EAAgB;EACvD,IAAI,CAACT,IAAI,CAAC,MAAM,CAAC;AACnB;AAEO,SAASU,YAAYA,CAE1BR,IAAoB,EACpBS,MAAc,EACd;EACA,IAAI,CAACd,0BAA0B,CAACc,MAAM,CAAC,EAAE;IACvC,IAAI,CAACX,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACY,KAAK,EAAE;EACd;EACA,IAAI,CAACZ,IAAI,CAAC,OAAO,CAAC;EAClB,IAAI,CAACY,KAAK,EAAE;EACZ,IAAI,CAACC,aAAa,CAACX,IAAI,CAAC;AAC1B;AAEO,SAASY,eAAeA,CAE7B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B"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/index.js.map b/node_modules/@babel/generator/lib/generators/index.js.map index a03022f0e..3592c3137 100644 --- a/node_modules/@babel/generator/lib/generators/index.js.map +++ b/node_modules/@babel/generator/lib/generators/index.js.map @@ -1 +1 @@ -{"version":3,"names":[],"sources":["../../src/generators/index.ts"],"sourcesContent":["export * from \"./template-literals\";\nexport * from \"./expressions\";\nexport * from \"./statements\";\nexport * from \"./classes\";\nexport * from \"./methods\";\nexport * from \"./modules\";\nexport * from \"./types\";\nexport * from \"./flow\";\nexport * from \"./base\";\nexport * from \"./jsx\";\nexport * from \"./typescript\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"} \ No newline at end of file +{"version":3,"names":["_templateLiterals","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_expressions","_statements","_classes","_methods","_modules","_types","_flow","_base","_jsx","_typescript"],"sources":["../../src/generators/index.ts"],"sourcesContent":["export * from \"./template-literals\";\nexport * from \"./expressions\";\nexport * from \"./statements\";\nexport * from \"./classes\";\nexport * from \"./methods\";\nexport * from \"./modules\";\nexport * from \"./types\";\nexport * from \"./flow\";\nexport * from \"./base\";\nexport * from \"./jsx\";\nexport * from \"./typescript\";\n"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,iBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,WAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,WAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,WAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD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IAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,IAAA,CAAAb,GAAA;IAAA;EAAA;AAAA;AACA,IAAAc,WAAA,GAAAlB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAgB,WAAA,EAAAf,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAc,WAAA,CAAAd,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,WAAA,CAAAd,GAAA;IAAA;EAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/jsx.js.map b/node_modules/@babel/generator/lib/generators/jsx.js.map index 89cddd439..5c4aad3ad 100644 --- a/node_modules/@babel/generator/lib/generators/jsx.js.map +++ b/node_modules/@babel/generator/lib/generators/jsx.js.map @@ -1 +1 @@ -{"version":3,"names":["JSXAttribute","node","print","name","value","token","JSXIdentifier","word","JSXNamespacedName","namespace","JSXMemberExpression","object","property","JSXSpreadAttribute","argument","JSXExpressionContainer","expression","JSXSpreadChild","JSXText","raw","getPossibleRaw","undefined","JSXElement","open","openingElement","selfClosing","indent","child","children","dedent","closingElement","spaceSeparator","space","JSXOpeningElement","typeParameters","attributes","length","printJoin","separator","JSXClosingElement","JSXEmptyExpression","printInnerComments","JSXFragment","openingFragment","closingFragment","JSXOpeningFragment","JSXClosingFragment"],"sources":["../../src/generators/jsx.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function JSXAttribute(this: Printer, node: t.JSXAttribute) {\n this.print(node.name, node);\n if (node.value) {\n this.token(\"=\");\n this.print(node.value, node);\n }\n}\n\nexport function JSXIdentifier(this: Printer, node: t.JSXIdentifier) {\n this.word(node.name);\n}\n\nexport function JSXNamespacedName(this: Printer, node: t.JSXNamespacedName) {\n this.print(node.namespace, node);\n this.token(\":\");\n this.print(node.name, node);\n}\n\nexport function JSXMemberExpression(\n this: Printer,\n node: t.JSXMemberExpression,\n) {\n this.print(node.object, node);\n this.token(\".\");\n this.print(node.property, node);\n}\n\nexport function JSXSpreadAttribute(this: Printer, node: t.JSXSpreadAttribute) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.argument, node);\n this.token(\"}\");\n}\n\nexport function JSXExpressionContainer(\n this: Printer,\n node: t.JSXExpressionContainer,\n) {\n this.token(\"{\");\n this.print(node.expression, node);\n this.token(\"}\");\n}\n\nexport function JSXSpreadChild(this: Printer, node: t.JSXSpreadChild) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.expression, node);\n this.token(\"}\");\n}\n\nexport function JSXText(this: Printer, node: t.JSXText) {\n const raw = this.getPossibleRaw(node);\n\n if (raw !== undefined) {\n this.token(raw, true);\n } else {\n this.token(node.value, true);\n }\n}\n\nexport function JSXElement(this: Printer, node: t.JSXElement) {\n const open = node.openingElement;\n this.print(open, node);\n if (open.selfClosing) return;\n\n this.indent();\n for (const child of node.children) {\n this.print(child, node);\n }\n this.dedent();\n\n this.print(node.closingElement, node);\n}\n\nfunction spaceSeparator(this: Printer) {\n this.space();\n}\n\nexport function JSXOpeningElement(this: Printer, node: t.JSXOpeningElement) {\n this.token(\"<\");\n this.print(node.name, node);\n this.print(node.typeParameters, node); // TS\n if (node.attributes.length > 0) {\n this.space();\n this.printJoin(node.attributes, node, { separator: spaceSeparator });\n }\n if (node.selfClosing) {\n this.space();\n this.token(\"/>\");\n } else {\n this.token(\">\");\n }\n}\n\nexport function JSXClosingElement(this: Printer, node: t.JSXClosingElement) {\n this.token(\"\");\n}\n\nexport function JSXEmptyExpression(this: Printer) {\n // This node is empty, so forcefully print its inner comments.\n this.printInnerComments();\n}\n\nexport function JSXFragment(this: Printer, node: t.JSXFragment) {\n this.print(node.openingFragment, node);\n\n this.indent();\n for (const child of node.children) {\n this.print(child, node);\n }\n this.dedent();\n\n this.print(node.closingFragment, node);\n}\n\nexport function JSXOpeningFragment(this: Printer) {\n this.token(\"<\");\n this.token(\">\");\n}\n\nexport function JSXClosingFragment(this: Printer) {\n this.token(\"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,SAASA,YAAY,CAAgBC,IAAoB,EAAE;EAChE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,IAAI,EAAEF,IAAI,CAAC;EAC3B,IAAIA,IAAI,CAACG,KAAK,EAAE;IACd,IAAI,CAACC,SAAK,IAAK;IACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACG,KAAK,EAAEH,IAAI,CAAC;EAC9B;AACF;AAEO,SAASK,aAAa,CAAgBL,IAAqB,EAAE;EAClE,IAAI,CAACM,IAAI,CAACN,IAAI,CAACE,IAAI,CAAC;AACtB;AAEO,SAASK,iBAAiB,CAAgBP,IAAyB,EAAE;EAC1E,IAAI,CAACC,KAAK,CAACD,IAAI,CAACQ,SAAS,EAAER,IAAI,CAAC;EAChC,IAAI,CAACI,SAAK,IAAK;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACE,IAAI,EAAEF,IAAI,CAAC;AAC7B;AAEO,SAASS,mBAAmB,CAEjCT,IAA2B,EAC3B;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACU,MAAM,EAAEV,IAAI,CAAC;EAC7B,IAAI,CAACI,SAAK,IAAK;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACW,QAAQ,EAAEX,IAAI,CAAC;AACjC;AAEO,SAASY,kBAAkB,CAAgBZ,IAA0B,EAAE;EAC5E,IAAI,CAACI,SAAK,KAAK;EACf,IAAI,CAACA,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,CAACH,KAAK,CAACD,IAAI,CAACa,QAAQ,EAAEb,IAAI,CAAC;EAC/B,IAAI,CA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AAEO,SAAS4C,kBAAkB,GAAgB;EAChD,IAAI,CAACxC,SAAK,IAAK;EACf,IAAI,CAACA,SAAK,IAAK;AACjB;AAEO,SAASyC,kBAAkB,GAAgB;EAChD,IAAI,CAACzC,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACA,SAAK,IAAK;AACjB"} \ No newline at end of file +{"version":3,"names":["JSXAttribute","node","print","name","value","token","JSXIdentifier","word","JSXNamespacedName","namespace","JSXMemberExpression","object","property","JSXSpreadAttribute","argument","JSXExpressionContainer","expression","JSXSpreadChild","JSXText","raw","getPossibleRaw","undefined","JSXElement","open","openingElement","selfClosing","indent","child","children","dedent","closingElement","spaceSeparator","space","JSXOpeningElement","typeParameters","attributes","length","printJoin","separator","JSXClosingElement","JSXEmptyExpression","printInnerComments","JSXFragment","openingFragment","closingFragment","JSXOpeningFragment","JSXClosingFragment"],"sources":["../../src/generators/jsx.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function JSXAttribute(this: Printer, node: t.JSXAttribute) {\n this.print(node.name, node);\n if (node.value) {\n this.token(\"=\");\n this.print(node.value, node);\n }\n}\n\nexport function JSXIdentifier(this: Printer, node: t.JSXIdentifier) {\n this.word(node.name);\n}\n\nexport function JSXNamespacedName(this: Printer, node: t.JSXNamespacedName) {\n this.print(node.namespace, node);\n this.token(\":\");\n this.print(node.name, node);\n}\n\nexport function JSXMemberExpression(\n this: Printer,\n node: t.JSXMemberExpression,\n) {\n this.print(node.object, node);\n this.token(\".\");\n this.print(node.property, node);\n}\n\nexport function JSXSpreadAttribute(this: Printer, node: t.JSXSpreadAttribute) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.argument, node);\n this.token(\"}\");\n}\n\nexport function JSXExpressionContainer(\n this: Printer,\n node: t.JSXExpressionContainer,\n) {\n this.token(\"{\");\n this.print(node.expression, node);\n this.token(\"}\");\n}\n\nexport function JSXSpreadChild(this: Printer, node: t.JSXSpreadChild) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.expression, node);\n this.token(\"}\");\n}\n\nexport function JSXText(this: Printer, node: t.JSXText) {\n const raw = this.getPossibleRaw(node);\n\n if (raw !== undefined) {\n this.token(raw, true);\n } else {\n this.token(node.value, true);\n }\n}\n\nexport function JSXElement(this: Printer, node: t.JSXElement) {\n const open = node.openingElement;\n this.print(open, node);\n if (open.selfClosing) return;\n\n this.indent();\n for (const child of node.children) {\n this.print(child, node);\n }\n this.dedent();\n\n this.print(node.closingElement, node);\n}\n\nfunction spaceSeparator(this: Printer) {\n this.space();\n}\n\nexport function JSXOpeningElement(this: Printer, node: t.JSXOpeningElement) {\n this.token(\"<\");\n this.print(node.name, node);\n this.print(node.typeParameters, node); // TS\n if (node.attributes.length > 0) {\n this.space();\n this.printJoin(node.attributes, node, { separator: spaceSeparator });\n }\n if (node.selfClosing) {\n this.space();\n this.token(\"/>\");\n } else {\n this.token(\">\");\n }\n}\n\nexport function JSXClosingElement(this: Printer, node: t.JSXClosingElement) {\n this.token(\"\");\n}\n\nexport function JSXEmptyExpression(this: Printer) {\n // This node is empty, so forcefully print its inner comments.\n this.printInnerComments();\n}\n\nexport function JSXFragment(this: Printer, node: t.JSXFragment) {\n this.print(node.openingFragment, node);\n\n this.indent();\n for (const child of node.children) {\n this.print(child, node);\n }\n this.dedent();\n\n this.print(node.closingFragment, node);\n}\n\nexport function JSXOpeningFragment(this: Printer) {\n this.token(\"<\");\n this.token(\">\");\n}\n\nexport function JSXClosingFragment(this: Printer) {\n this.token(\"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,SAASA,YAAYA,CAAgBC,IAAoB,EAAE;EAChE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,IAAI,EAAEF,IAAI,CAAC;EAC3B,IAAIA,IAAI,CAACG,KAAK,EAAE;IACd,IAAI,CAACC,SAAK,IAAK;IACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACG,KAAK,EAAEH,IAAI,CAAC;EAC9B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AAE;IACZ,IAAI,CAAC3B,KAAK,CAAC,IAAI,CAAC;EAClB,CAAC,MAAM;IACL,IAAI,CAACA,SAAK,IAAK;EACjB;AACF;AAEO,SAASkC,iBAAiBA,CAAgBtC,IAAyB,EAAE;EAC1E,IAAI,CAACI,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACH,KAAK,CAACD,IAAI,CAACE,IAAI,EAAEF,IAAI,CAAC;EAC3B,IAAI,CAACI,SAAK,IAAK;AACjB;AAEO,SAASmC,kBAAkBA,CAAA,EAAgB;EAEhD,IAAI,CAACC,kBAAkB,EAAE;AAC3B;AAEO,SAASC,WAAWA,CAAgBzC,IAAmB,EAAE;EAC9D,IAAI,CAACC,KAAK,CAACD,IAAI,CAAC0C,eAAe,EAAE1C,IAAI,CAAC;EAEtC,IAAI,CAACyB,MAAM,EAAE;EACb,KAAK,MAAMC,KAAK,IAAI1B,IAAI,CAAC2B,QAAQ,EAAE;IACjC,IAAI,CAAC1B,KAAK,CAACyB,KAAK,EAAE1B,IAAI,CAAC;EACzB;EACA,IAAI,CAAC4B,MAAM,EAAE;EAEb,IAAI,CAAC3B,KAAK,CAACD,IAAI,CAAC2C,eAAe,EAAE3C,IAAI,CAAC;AACxC;AAEO,SAAS4C,kBAAkBA,CAAA,EAAgB;EAChD,IAAI,CAACxC,SAAK,IAAK;EACf,IAAI,CAACA,SAAK,IAAK;AACjB;AAEO,SAASyC,kBAAkBA,CAAA,EAAgB;EAChD,IAAI,CAACzC,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACA,SAAK,IAAK;AACjB"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/methods.js b/node_modules/@babel/generator/lib/generators/methods.js index f0784729e..b91cee2bf 100644 --- a/node_modules/@babel/generator/lib/generators/methods.js +++ b/node_modules/@babel/generator/lib/generators/methods.js @@ -15,8 +15,12 @@ var _t = require("@babel/types"); const { isIdentifier } = _t; -function _params(node) { +function _params(node, idNode, parentNode) { this.print(node.typeParameters, node); + const nameInfo = _getFuncIdName.call(this, idNode, parentNode); + if (nameInfo) { + this.sourceIdentifierName(nameInfo.name, nameInfo.pos); + } this.tokenChar(40); this._parameters(node.params, node); this.tokenChar(41); @@ -37,15 +41,11 @@ function _parameters(parameters, parent) { function _param(parameter, parent) { this.printJoin(parameter.decorators, parameter); this.print(parameter, parent); - if ( - parameter.optional) { + if (parameter.optional) { this.tokenChar(63); } - - this.print( - parameter.typeAnnotation, parameter); + this.print(parameter.typeAnnotation, parameter); } - function _methodHead(node) { const kind = node.kind; const key = node.key; @@ -57,8 +57,7 @@ function _methodHead(node) { this.word("async", true); this.space(); } - if (kind === "method" || - kind === "init") { + if (kind === "method" || kind === "init") { if (node.generator) { this.tokenChar(42); } @@ -70,11 +69,10 @@ function _methodHead(node) { } else { this.print(key, node); } - if ( - node.optional) { + if (node.optional) { this.tokenChar(63); } - this._params(node); + this._params(node, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key, undefined); } function _predicate(node, noLineTerminatorAfter) { if (node.predicate) { @@ -85,7 +83,7 @@ function _predicate(node, noLineTerminatorAfter) { this.print(node.predicate, node, noLineTerminatorAfter); } } -function _functionHead(node) { +function _functionHead(node, parent) { if (node.async) { this.word("async"); this._endsWithInnerRaw = false; @@ -100,27 +98,26 @@ function _functionHead(node) { if (node.id) { this.print(node.id, node); } - this._params(node); + this._params(node, node.id, parent); if (node.type !== "TSDeclareFunction") { this._predicate(node); } } -function FunctionExpression(node) { - this._functionHead(node); +function FunctionExpression(node, parent) { + this._functionHead(node, parent); this.space(); this.print(node.body, node); } -function ArrowFunctionExpression(node) { +function ArrowFunctionExpression(node, parent) { if (node.async) { this.word("async", true); this.space(); } - let firstParam; if (!this.format.retainLines && node.params.length === 1 && isIdentifier(firstParam = node.params[0]) && !hasTypesOrComments(node, firstParam)) { this.print(firstParam, node, true); } else { - this._params(node); + this._params(node, undefined, parent); } this._predicate(node, true); this.space(); @@ -133,5 +130,44 @@ function hasTypesOrComments(node, param) { var _param$leadingComment, _param$trailingCommen; return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length); } +function _getFuncIdName(idNode, parent) { + let id = idNode; + if (!id && parent) { + const parentType = parent.type; + if (parentType === "VariableDeclarator") { + id = parent.id; + } else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") { + id = parent.left; + } else if (parentType === "ObjectProperty" || parentType === "ClassProperty") { + if (!parent.computed || parent.key.type === "StringLiteral") { + id = parent.key; + } + } else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") { + id = parent.key; + } + } + if (!id) return; + let nameInfo; + if (id.type === "Identifier") { + var _id$loc, _id$loc2; + nameInfo = { + pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start, + name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name + }; + } else if (id.type === "PrivateName") { + var _id$loc3; + nameInfo = { + pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start, + name: "#" + id.id.name + }; + } else if (id.type === "StringLiteral") { + var _id$loc4; + nameInfo = { + pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start, + name: id.value + }; + } + return nameInfo; +} //# sourceMappingURL=methods.js.map diff --git a/node_modules/@babel/generator/lib/generators/methods.js.map b/node_modules/@babel/generator/lib/generators/methods.js.map index c8b10bfcc..f06bc77f1 100644 --- a/node_modules/@babel/generator/lib/generators/methods.js.map +++ b/node_modules/@babel/generator/lib/generators/methods.js.map @@ -1 +1 @@ -{"version":3,"names":["isIdentifier","_params","node","print","typeParameters","token","_parameters","params","noLineTerminator","type","returnType","_noLineTerminator","parameters","parent","paramLength","length","i","_param","space","parameter","printJoin","decorators","optional","typeAnnotation","_methodHead","kind","key","word","async","generator","computed","_predicate","noLineTerminatorAfter","predicate","_functionHead","_endsWithInnerRaw","id","FunctionExpression","body","ArrowFunctionExpression","firstParam","format","retainLines","hasTypesOrComments","printInnerComments","param","leadingComments","trailingComments"],"sources":["../../src/generators/methods.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function _params(\n this: Printer,\n node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction,\n) {\n this.print(node.typeParameters, node);\n this.token(\"(\");\n this._parameters(node.params, node);\n this.token(\")\");\n\n const noLineTerminator = node.type === \"ArrowFunctionExpression\";\n this.print(node.returnType, node, noLineTerminator);\n\n this._noLineTerminator = noLineTerminator;\n}\n\nexport function _parameters(\n this: Printer,\n parameters: t.Function[\"params\"],\n parent:\n | t.Function\n | t.TSIndexSignature\n | t.TSDeclareMethod\n | t.TSDeclareFunction\n | t.TSFunctionType\n | t.TSConstructorType,\n) {\n const paramLength = parameters.length;\n for (let i = 0; i < paramLength; i++) {\n this._param(parameters[i], parent);\n\n if (i < parameters.length - 1) {\n this.token(\",\");\n this.space();\n }\n }\n}\n\nexport function _param(\n this: Printer,\n parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty,\n parent?:\n | t.Function\n | t.TSIndexSignature\n | t.TSDeclareMethod\n | t.TSDeclareFunction\n | t.TSFunctionType\n | t.TSConstructorType,\n) {\n this.printJoin(parameter.decorators, parameter);\n this.print(parameter, parent);\n if (\n // @ts-expect-error optional is not in TSParameterProperty\n parameter.optional\n ) {\n this.token(\"?\"); // TS / flow\n }\n\n this.print(\n // @ts-expect-error typeAnnotation is not in TSParameterProperty\n parameter.typeAnnotation,\n parameter,\n ); // TS / flow\n}\n\nexport function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) {\n const kind = node.kind;\n const key = node.key;\n\n if (kind === \"get\" || kind === \"set\") {\n this.word(kind);\n this.space();\n }\n\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (\n kind === \"method\" ||\n // @ts-expect-error Fixme: kind: \"init\" is not defined\n kind === \"init\"\n ) {\n if (node.generator) {\n this.token(\"*\");\n }\n }\n\n if (node.computed) {\n this.token(\"[\");\n this.print(key, node);\n this.token(\"]\");\n } else {\n this.print(key, node);\n }\n\n if (\n // @ts-expect-error optional is not in ObjectMethod\n node.optional\n ) {\n // TS\n this.token(\"?\");\n }\n\n this._params(node);\n}\n\nexport function _predicate(\n this: Printer,\n node:\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.ArrowFunctionExpression,\n noLineTerminatorAfter?: boolean,\n) {\n if (node.predicate) {\n if (!node.returnType) {\n this.token(\":\");\n }\n this.space();\n this.print(node.predicate, node, noLineTerminatorAfter);\n }\n}\n\nexport function _functionHead(\n this: Printer,\n node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction,\n) {\n if (node.async) {\n this.word(\"async\");\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n this.space();\n }\n this.word(\"function\");\n if (node.generator) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n this.token(\"*\");\n }\n\n this.space();\n if (node.id) {\n this.print(node.id, node);\n }\n\n this._params(node);\n if (node.type !== \"TSDeclareFunction\") {\n this._predicate(node);\n }\n}\n\nexport function FunctionExpression(this: Printer, node: t.FunctionExpression) {\n this._functionHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport { FunctionExpression as FunctionDeclaration };\n\nexport function ArrowFunctionExpression(\n this: Printer,\n node: t.ArrowFunctionExpression,\n) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n // Try to avoid printing parens in simple cases, but only if we're pretty\n // sure that they aren't needed by type annotations or potential newlines.\n let firstParam;\n if (\n !this.format.retainLines &&\n node.params.length === 1 &&\n isIdentifier((firstParam = node.params[0])) &&\n !hasTypesOrComments(node, firstParam)\n ) {\n this.print(firstParam, node, true);\n } else {\n this._params(node);\n }\n\n this._predicate(node, true);\n this.space();\n // When printing (x)/*1*/=>{}, we remove the parentheses\n // and thus there aren't two contiguous inner tokens.\n // We forcefully print inner comments here.\n this.printInnerComments();\n this.token(\"=>\");\n\n this.space();\n\n this.print(node.body, node);\n}\n\nfunction hasTypesOrComments(\n node: t.ArrowFunctionExpression,\n param: t.Identifier,\n): boolean {\n return !!(\n node.typeParameters ||\n node.returnType ||\n node.predicate ||\n param.typeAnnotation ||\n param.optional ||\n // Flow does not support `foo /*: string*/ => {};`\n param.leadingComments?.length ||\n param.trailingComments?.length\n );\n}\n"],"mappings":";;;;;;;;;;;;;AACA;AAA4C;EAAnCA;AAAY;AAGd,SAASC,OAAO,CAErBC,IAA0D,EAC1D;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,cAAc,EAAEF,IAAI,CAAC;EACrC,IAAI,CAACG,SAAK,IAAK;EACf,IAAI,CAACC,WAAW,CAACJ,IAAI,CAACK,MAAM,EAAEL,IAAI,CAAC;EACnC,IAAI,CAACG,SAAK,IAAK;EAEf,MAAMG,gBAAgB,GAAGN,IAAI,CAACO,IAAI,KAAK,yBAAyB;EAChE,IAAI,CAACN,KAAK,CAACD,IAAI,CAACQ,UAAU,EAAER,IAAI,EAAEM,gBAAgB,CAAC;EAEnD,IAAI,CAACG,iBAAiB,GAAGH,gBAAgB;AAC3C;AAEO,SAASF,WAAW,CAEzBM,UAAgC,EAChCC,MAMuB,EACvB;EACA,MAAMC,WAAW,GAAGF,UAAU,CAACG,MAAM;EACrC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,WAAW,EAAEE,CAAC,EAAE,EAAE;IACpC,IAAI,CAACC,MAAM,CAACL,UAAU,CAACI,CAAC,CAAC,EAAEH,MAAM,CAAC;IAElC,IAAIG,CAAC,GAAGJ,UAAU,CAACG,MAAM,GAAG,CAAC,EAAE;MAC7B,IAAI,CAACV,SAAK,IAAK;MACf,IAAI,CAACa,KAAK,EAAE;IACd;EACF;AACF;AAEO,SAASD,MAAM,CAEpBE,SAA2E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AAI,CAACD,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;IACxB,IAAI,CAACT,KAAK,EAAE;EACd;;EAIA,IAAIsB,UAAU;EACd,IACE,CAAC,IAAI,CAACC,MAAM,CAACC,WAAW,IACxBxC,IAAI,CAACK,MAAM,CAACQ,MAAM,KAAK,CAAC,IACxBf,YAAY,CAAEwC,UAAU,GAAGtC,IAAI,CAACK,MAAM,CAAC,CAAC,CAAC,CAAE,IAC3C,CAACoC,kBAAkB,CAACzC,IAAI,EAAEsC,UAAU,CAAC,EACrC;IACA,IAAI,CAACrC,KAAK,CAACqC,UAAU,EAAEtC,IAAI,EAAE,IAAI,CAAC;EACpC,CAAC,MAAM;IACL,IAAI,CAACD,OAAO,CAACC,IAAI,CAAC;EACpB;EAEA,IAAI,CAAC6B,UAAU,CAAC7B,IAAI,EAAE,IAAI,CAAC;EAC3B,IAAI,CAACgB,KAAK,EAAE;EAIZ,IAAI,CAAC0B,kBAAkB,EAAE;EACzB,IAAI,CAACvC,KAAK,CAAC,IAAI,CAAC;EAEhB,IAAI,CAACa,KAAK,EAAE;EAEZ,IAAI,CAACf,KAAK,CAACD,IAAI,CAACoC,IAAI,EAAEpC,IAAI,CAAC;AAC7B;AAEA,SAASyC,kBAAkB,CACzBzC,IAA+B,EAC/B2C,KAAmB,EACV;EAAA;EACT,OAAO,CAAC,EACN3C,IAAI,CAACE,cAAc,IACnBF,IAAI,CAACQ,UAAU,IACfR,IAAI,CAAC+B,SAAS,IACdY,KAAK,CAACtB,cAAc,IACpBsB,KAAK,CAACvB,QAAQ,6BAEduB,KAAK,CAACC,eAAe,aAArB,sBAAuB/B,MAAM,6BAC7B8B,KAAK,CAACE,gBAAgB,aAAtB,sBAAwBhC,MAAM,CAC/B;AACH"} \ No newline at end of file +{"version":3,"names":["_t","require","isIdentifier","_params","node","idNode","parentNode","print","typeParameters","nameInfo","_getFuncIdName","call","sourceIdentifierName","name","pos","token","_parameters","params","noLineTerminator","type","returnType","_noLineTerminator","parameters","parent","paramLength","length","i","_param","space","parameter","printJoin","decorators","optional","typeAnnotation","_methodHead","kind","key","word","async","generator","computed","undefined","_predicate","noLineTerminatorAfter","predicate","_functionHead","_endsWithInnerRaw","id","FunctionExpression","body","ArrowFunctionExpression","firstParam","format","retainLines","hasTypesOrComments","printInnerComments","param","_param$leadingComment","_param$trailingCommen","leadingComments","trailingComments","parentType","left","_id$loc","_id$loc2","loc","start","identifierName","_id$loc3","_id$loc4","value"],"sources":["../../src/generators/methods.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\nimport { isIdentifier } from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport function _params(\n this: Printer,\n node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction,\n idNode: t.Expression | t.PrivateName,\n parentNode: NodePath<\n t.Function | t.TSDeclareMethod | t.TSDeclareFunction\n >[\"parent\"],\n) {\n this.print(node.typeParameters, node);\n\n const nameInfo = _getFuncIdName.call(this, idNode, parentNode);\n if (nameInfo) {\n this.sourceIdentifierName(nameInfo.name, nameInfo.pos);\n }\n\n this.token(\"(\");\n this._parameters(node.params, node);\n this.token(\")\");\n\n const noLineTerminator = node.type === \"ArrowFunctionExpression\";\n this.print(node.returnType, node, noLineTerminator);\n\n this._noLineTerminator = noLineTerminator;\n}\n\nexport function _parameters(\n this: Printer,\n parameters: t.Function[\"params\"],\n parent:\n | t.Function\n | t.TSIndexSignature\n | t.TSDeclareMethod\n | t.TSDeclareFunction\n | t.TSFunctionType\n | t.TSConstructorType,\n) {\n const paramLength = parameters.length;\n for (let i = 0; i < paramLength; i++) {\n this._param(parameters[i], parent);\n\n if (i < parameters.length - 1) {\n this.token(\",\");\n this.space();\n }\n }\n}\n\nexport function _param(\n this: Printer,\n parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty,\n parent?:\n | t.Function\n | t.TSIndexSignature\n | t.TSDeclareMethod\n | t.TSDeclareFunction\n | t.TSFunctionType\n | t.TSConstructorType,\n) {\n this.printJoin(parameter.decorators, parameter);\n this.print(parameter, parent);\n if (\n // @ts-expect-error optional is not in TSParameterProperty\n parameter.optional\n ) {\n this.token(\"?\"); // TS / flow\n }\n\n this.print(\n // @ts-expect-error typeAnnotation is not in TSParameterProperty\n parameter.typeAnnotation,\n parameter,\n ); // TS / flow\n}\n\nexport function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) {\n const kind = node.kind;\n const key = node.key;\n\n if (kind === \"get\" || kind === \"set\") {\n this.word(kind);\n this.space();\n }\n\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (\n kind === \"method\" ||\n // @ts-expect-error Fixme: kind: \"init\" is not defined\n kind === \"init\"\n ) {\n if (node.generator) {\n this.token(\"*\");\n }\n }\n\n if (node.computed) {\n this.token(\"[\");\n this.print(key, node);\n this.token(\"]\");\n } else {\n this.print(key, node);\n }\n\n if (\n // @ts-expect-error optional is not in ObjectMethod\n node.optional\n ) {\n // TS\n this.token(\"?\");\n }\n\n this._params(\n node,\n node.computed && node.key.type !== \"StringLiteral\" ? undefined : node.key,\n undefined,\n );\n}\n\nexport function _predicate(\n this: Printer,\n node:\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.ArrowFunctionExpression,\n noLineTerminatorAfter?: boolean,\n) {\n if (node.predicate) {\n if (!node.returnType) {\n this.token(\":\");\n }\n this.space();\n this.print(node.predicate, node, noLineTerminatorAfter);\n }\n}\n\nexport function _functionHead(\n this: Printer,\n node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction,\n parent: NodePath<\n t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction\n >[\"parent\"],\n) {\n if (node.async) {\n this.word(\"async\");\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n this.space();\n }\n this.word(\"function\");\n if (node.generator) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n this.token(\"*\");\n }\n\n this.space();\n if (node.id) {\n this.print(node.id, node);\n }\n\n this._params(node, node.id, parent);\n if (node.type !== \"TSDeclareFunction\") {\n this._predicate(node);\n }\n}\n\nexport function FunctionExpression(\n this: Printer,\n node: t.FunctionExpression,\n parent: NodePath[\"parent\"],\n) {\n this._functionHead(node, parent);\n this.space();\n this.print(node.body, node);\n}\n\nexport { FunctionExpression as FunctionDeclaration };\n\nexport function ArrowFunctionExpression(\n this: Printer,\n node: t.ArrowFunctionExpression,\n parent: NodePath[\"parent\"],\n) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n // Try to avoid printing parens in simple cases, but only if we're pretty\n // sure that they aren't needed by type annotations or potential newlines.\n let firstParam;\n if (\n !this.format.retainLines &&\n node.params.length === 1 &&\n isIdentifier((firstParam = node.params[0])) &&\n !hasTypesOrComments(node, firstParam)\n ) {\n this.print(firstParam, node, true);\n } else {\n this._params(node, undefined, parent);\n }\n\n this._predicate(node, true);\n this.space();\n // When printing (x)/*1*/=>{}, we remove the parentheses\n // and thus there aren't two contiguous inner tokens.\n // We forcefully print inner comments here.\n this.printInnerComments();\n this.token(\"=>\");\n\n this.space();\n\n this.print(node.body, node);\n}\n\nfunction hasTypesOrComments(\n node: t.ArrowFunctionExpression,\n param: t.Identifier,\n): boolean {\n return !!(\n node.typeParameters ||\n node.returnType ||\n node.predicate ||\n param.typeAnnotation ||\n param.optional ||\n // Flow does not support `foo /*: string*/ => {};`\n param.leadingComments?.length ||\n param.trailingComments?.length\n );\n}\n\nfunction _getFuncIdName(\n this: Printer,\n idNode: t.Expression | t.PrivateName,\n parent: NodePath<\n t.Function | t.TSDeclareMethod | t.TSDeclareFunction\n >[\"parent\"],\n) {\n let id: t.Expression | t.PrivateName | t.LVal = idNode;\n\n if (!id && parent) {\n const parentType = parent.type;\n\n if (parentType === \"VariableDeclarator\") {\n id = parent.id;\n } else if (\n parentType === \"AssignmentExpression\" ||\n parentType === \"AssignmentPattern\"\n ) {\n id = parent.left;\n } else if (\n parentType === \"ObjectProperty\" ||\n parentType === \"ClassProperty\"\n ) {\n if (!parent.computed || parent.key.type === \"StringLiteral\") {\n id = parent.key;\n }\n } else if (\n parentType === \"ClassPrivateProperty\" ||\n parentType === \"ClassAccessorProperty\"\n ) {\n id = parent.key;\n }\n }\n\n if (!id) return;\n\n let nameInfo;\n\n if (id.type === \"Identifier\") {\n nameInfo = {\n pos: id.loc?.start,\n name:\n // @ts-expect-error Undocumented property identifierName\n id.loc?.identifierName || id.name,\n };\n } else if (id.type === \"PrivateName\") {\n nameInfo = {\n pos: id.loc?.start,\n name: \"#\" + id.id.name,\n };\n } else if (id.type === \"StringLiteral\") {\n nameInfo = {\n pos: id.loc?.start,\n name: id.value,\n };\n }\n\n return nameInfo;\n}\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAA4C;EAAnCC;AAAY,IAAAF,EAAA;AAGd,SAASG,OAAOA,CAErBC,IAA0D,EAC1DC,MAAoC,EACpCC,UAEW,EACX;EACA,IAAI,CAACC,KAAK,CAACH,IAAI,CAACI,cAAc,EAAEJ,IAAI,CAAC;EAErC,MAAMK,QAAQ,GAAGC,cAAc,CAACC,IAAI,CAAC,IAAI,EAAEN,MAAM,EAAEC,UAAU,CAAC;EAC9D,IAAIG,QAAQ,EAAE;IACZ,IAAI,CAACG,oBAAoB,CAACH,QAAQ,CAACI,IAAI,EAAEJ,QAAQ,CAACK,GAAG,CAAC;EACxD;EAEA,IAAI,CAACC,SAAK,IAAK;EACf,IAAI,CAACC,WAAW,CAACZ,IAAI,CAACa,MAAM,EAAEb,IAAI,CAAC;EACnC,IAAI,CAACW,SAAK,IAAK;EAEf,MAAMG,gBAAgB,GAAGd,IAAI,CAACe,IAAI,KAAK,yBAAyB;EAChE,IAAI,CAACZ,KAAK,CAACH,IAAI,CAACgB,UAAU,EAAEhB,IAAI,EAAEc,gBAAgB,CAAC;EAEnD,IAAI,CAACG,iBA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GxB,MAAM,CAACa,GAAG;MACjB;IACF,CAAC,MAAM,IACLyB,UAAU,KAAK,sBAAsB,IACrCA,UAAU,KAAK,uBAAuB,EACtC;MACAd,EAAE,GAAGxB,MAAM,CAACa,GAAG;IACjB;EACF;EAEA,IAAI,CAACW,EAAE,EAAE;EAET,IAAItC,QAAQ;EAEZ,IAAIsC,EAAE,CAAC5B,IAAI,KAAK,YAAY,EAAE;IAAA,IAAA4C,OAAA,EAAAC,QAAA;IAC5BvD,QAAQ,GAAG;MACTK,GAAG,GAAAiD,OAAA,GAAEhB,EAAE,CAACkB,GAAG,qBAANF,OAAA,CAAQG,KAAK;MAClBrD,IAAI,EAEF,EAAAmD,QAAA,GAAAjB,EAAE,CAACkB,GAAG,qBAAND,QAAA,CAAQG,cAAc,KAAIpB,EAAE,CAAClC;IACjC,CAAC;EACH,CAAC,MAAM,IAAIkC,EAAE,CAAC5B,IAAI,KAAK,aAAa,EAAE;IAAA,IAAAiD,QAAA;IACpC3D,QAAQ,GAAG;MACTK,GAAG,GAAAsD,QAAA,GAAErB,EAAE,CAACkB,GAAG,qBAANG,QAAA,CAAQF,KAAK;MAClBrD,IAAI,EAAE,GAAG,GAAGkC,EAAE,CAACA,EAAE,CAAClC;IACpB,CAAC;EACH,CAAC,MAAM,IAAIkC,EAAE,CAAC5B,IAAI,KAAK,eAAe,EAAE;IAAA,IAAAkD,QAAA;IACtC5D,QAAQ,GAAG;MACTK,GAAG,GAAAuD,QAAA,GAAEtB,EAAE,CAACkB,GAAG,qBAANI,QAAA,CAAQH,KAAK;MAClBrD,IAAI,EAAEkC,EAAE,CAACuB;IACX,CAAC;EACH;EAEA,OAAO7D,QAAQ;AACjB"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/modules.js b/node_modules/@babel/generator/lib/generators/modules.js index d51d013ca..8ee280c32 100644 --- a/node_modules/@babel/generator/lib/generators/modules.js +++ b/node_modules/@babel/generator/lib/generators/modules.js @@ -93,12 +93,13 @@ function ExportAllDeclaration(node) { } this.semicolon(); } -function ExportNamedDeclaration(node) { - { - if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } +function maybePrintDecoratorsBeforeExport(printer, node) { + if (isClassDeclaration(node.declaration) && printer._shouldPrintDecoratorsBeforeExport(node)) { + printer.printJoin(node.declaration.decorators, node); } +} +function ExportNamedDeclaration(node) { + maybePrintDecoratorsBeforeExport(this, node); this.word("export"); this.space(); if (node.declaration) { @@ -111,7 +112,6 @@ function ExportNamedDeclaration(node) { this.space(); } const specifiers = node.specifiers.slice(0); - let hasSpecial = false; for (;;) { const first = specifiers[0]; @@ -152,11 +152,7 @@ function ExportNamedDeclaration(node) { } } function ExportDefaultDeclaration(node) { - { - if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } - } + maybePrintDecoratorsBeforeExport(this, node); this.word("export"); this.noIndentInnerCommentsHere(); this.space(); diff --git a/node_modules/@babel/generator/lib/generators/modules.js.map b/node_modules/@babel/generator/lib/generators/modules.js.map index db8d9edc9..4df3c9c1f 100644 --- a/node_modules/@babel/generator/lib/generators/modules.js.map +++ b/node_modules/@babel/generator/lib/generators/modules.js.map @@ -1 +1 @@ -{"version":3,"names":["isClassDeclaration","isExportDefaultSpecifier","isExportNamespaceSpecifier","isImportDefaultSpecifier","isImportNamespaceSpecifier","isStatement","ImportSpecifier","node","importKind","word","space","print","imported","local","name","ImportDefaultSpecifier","ExportDefaultSpecifier","exported","ExportSpecifier","exportKind","ExportNamespaceSpecifier","token","_printAssertions","printList","assertions","ExportAllDeclaration","length","source","semicolon","ExportNamedDeclaration","format","decoratorsBeforeExport","declaration","printJoin","decorators","declar","specifiers","slice","hasSpecial","first","shift","ExportDefaultDeclaration","noIndentInnerCommentsHere","ImportDeclaration","isTypeKind","module","hasSpecifiers","attributes","ImportAttribute","key","value","ImportNamespaceSpecifier"],"sources":["../../src/generators/modules.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isClassDeclaration,\n isExportDefaultSpecifier,\n isExportNamespaceSpecifier,\n isImportDefaultSpecifier,\n isImportNamespaceSpecifier,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function ImportSpecifier(this: Printer, node: t.ImportSpecifier) {\n if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n this.word(node.importKind);\n this.space();\n }\n\n this.print(node.imported, node);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.local && node.local.name !== node.imported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local, node);\n }\n}\n\nexport function ImportDefaultSpecifier(\n this: Printer,\n node: t.ImportDefaultSpecifier,\n) {\n this.print(node.local, node);\n}\n\nexport function ExportDefaultSpecifier(\n this: Printer,\n node: t.ExportDefaultSpecifier,\n) {\n this.print(node.exported, node);\n}\n\nexport function ExportSpecifier(this: Printer, node: t.ExportSpecifier) {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n this.print(node.local, node);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.exported && node.local.name !== node.exported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported, node);\n }\n}\n\nexport function ExportNamespaceSpecifier(\n this: Printer,\n node: t.ExportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported, node);\n}\n\nexport function _printAssertions(\n this: Printer,\n node: Extract,\n) {\n this.word(\"assert\");\n this.space();\n this.token(\"{\");\n this.space();\n this.printList(node.assertions, node);\n this.space();\n this.token(\"}\");\n}\n\nexport function ExportAllDeclaration(\n this: Printer,\n node: t.ExportAllDeclaration | t.DeclareExportAllDeclaration,\n) {\n this.word(\"export\");\n this.space();\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n this.token(\"*\");\n this.space();\n this.word(\"from\");\n this.space();\n // @ts-expect-error Fixme: assertions is not defined in DeclareExportAllDeclaration\n if (node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n // @ts-expect-error Fixme: assertions is not defined in DeclareExportAllDeclaration\n this._printAssertions(node);\n } else {\n this.print(node.source, node);\n }\n\n this.semicolon();\n}\n\nexport function ExportNamedDeclaration(\n this: Printer,\n node: t.ExportNamedDeclaration,\n) {\n if (!process.env.BABEL_8_BREAKING) {\n if (\n this.format.decoratorsBeforeExport &&\n isClassDeclaration(node.declaration)\n ) {\n this.printJoin(node.declaration.decorators, node);\n }\n }\n\n this.word(\"export\");\n this.space();\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n\n // print \"special\" specifiers first\n let hasSpecial = false;\n for (;;) {\n const first = specifiers[0];\n if (\n isExportDefaultSpecifier(first) ||\n isExportNamespaceSpecifier(first)\n ) {\n hasSpecial = true;\n this.print(specifiers.shift(), node);\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n if (specifiers.length || (!specifiers.length && !hasSpecial)) {\n this.token(\"{\");\n if (specifiers.length) {\n this.space();\n this.printList(specifiers, node);\n this.space();\n }\n this.token(\"}\");\n }\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n if (node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n this._printAssertions(node);\n } else {\n this.print(node.source, node);\n }\n }\n\n this.semicolon();\n }\n}\n\nexport function ExportDefaultDeclaration(\n this: Printer,\n node: t.ExportDefaultDeclaration,\n) {\n if (!process.env.BABEL_8_BREAKING) {\n if (\n this.format.decoratorsBeforeExport &&\n isClassDeclaration(node.declaration)\n ) {\n this.printJoin(node.declaration.decorators, node);\n }\n }\n\n this.word(\"export\");\n this.noIndentInnerCommentsHere();\n this.space();\n this.word(\"default\");\n this.space();\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n}\n\nexport function ImportDeclaration(this: Printer, node: t.ImportDeclaration) {\n this.word(\"import\");\n this.space();\n\n const isTypeKind = node.importKind === \"type\" || node.importKind === \"typeof\";\n if (isTypeKind) {\n this.noIndentInnerCommentsHere();\n this.word(node.importKind);\n this.space();\n } else if (node.module) {\n this.noIndentInnerCommentsHere();\n this.word(\"module\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n const hasSpecifiers = !!specifiers.length;\n // print \"special\" specifiers first. The loop condition is constant,\n // but there is a \"break\" in the body.\n while (hasSpecifiers) {\n const first = specifiers[0];\n if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n this.print(specifiers.shift(), node);\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n if (specifiers.length) {\n this.token(\"{\");\n this.space();\n this.printList(specifiers, node);\n this.space();\n this.token(\"}\");\n } else if (isTypeKind && !hasSpecifiers) {\n this.token(\"{\");\n this.token(\"}\");\n }\n\n if (hasSpecifiers || isTypeKind) {\n this.space();\n this.word(\"from\");\n this.space();\n }\n\n if (node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n this._printAssertions(node);\n } else {\n this.print(node.source, node);\n }\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 supports module attributes\n if (node.attributes?.length) {\n this.space();\n this.word(\"with\");\n this.space();\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 supports module attributes\n this.printList(node.attributes, node);\n }\n }\n\n this.semicolon();\n}\n\nexport function ImportAttribute(this: Printer, node: t.ImportAttribute) {\n this.print(node.key);\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ImportNamespaceSpecifier(\n this: Printer,\n node: t.ImportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local, node);\n}\n"],"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AAI,CAACC,KAAK,EAAE;MAEZ,IAAI,CAACa,SAAS,CAAChB,IAAI,CAACwC,UAAU,EAAExC,IAAI,CAAC;IACvC;EACF;EAEA,IAAI,CAACqB,SAAS,EAAE;AAClB;AAEO,SAASoB,eAAe,CAAgBzC,IAAuB,EAAE;EACtE,IAAI,CAACI,KAAK,CAACJ,IAAI,CAAC0C,GAAG,CAAC;EACpB,IAAI,CAAC5B,SAAK,IAAK;EACf,IAAI,CAACX,KAAK,EAAE;EACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAC2C,KAAK,CAAC;AACxB;AAEO,SAASC,wBAAwB,CAEtC5C,IAAgC,EAChC;EACA,IAAI,CAACc,SAAK,IAAK;EACf,IAAI,CAACX,KAAK,EAAE;EACZ,IAAI,CAACD,IAAI,CAAC,IAAI,CAAC;EACf,IAAI,CAACC,KAAK,EAAE;EACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACM,KAAK,EAAEN,IAAI,CAAC;AAC9B"} \ No newline at end of file +{"version":3,"names":["_t","require","isClassDeclaration","isExportDefaultSpecifier","isExportNamespaceSpecifier","isImportDefaultSpecifier","isImportNamespaceSpecifier","isStatement","ImportSpecifier","node","importKind","word","space","print","imported","local","name","ImportDefaultSpecifier","ExportDefaultSpecifier","exported","ExportSpecifier","exportKind","ExportNamespaceSpecifier","token","_printAssertions","printList","assertions","ExportAllDeclaration","_node$assertions","length","source","semicolon","maybePrintDecoratorsBeforeExport","printer","declaration","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","ExportNamedDeclaration","declar","specifiers","slice","hasSpecial","first","shift","_node$assertions2","ExportDefaultDeclaration","noIndentInnerCommentsHere","ImportDeclaration","_node$assertions3","isTypeKind","module","hasSpecifiers","_node$attributes","attributes","ImportAttribute","key","value","ImportNamespaceSpecifier"],"sources":["../../src/generators/modules.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isClassDeclaration,\n isExportDefaultSpecifier,\n isExportNamespaceSpecifier,\n isImportDefaultSpecifier,\n isImportNamespaceSpecifier,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function ImportSpecifier(this: Printer, node: t.ImportSpecifier) {\n if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n this.word(node.importKind);\n this.space();\n }\n\n this.print(node.imported, node);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.local && node.local.name !== node.imported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local, node);\n }\n}\n\nexport function ImportDefaultSpecifier(\n this: Printer,\n node: t.ImportDefaultSpecifier,\n) {\n this.print(node.local, node);\n}\n\nexport function ExportDefaultSpecifier(\n this: Printer,\n node: t.ExportDefaultSpecifier,\n) {\n this.print(node.exported, node);\n}\n\nexport function ExportSpecifier(this: Printer, node: t.ExportSpecifier) {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n this.print(node.local, node);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.exported && node.local.name !== node.exported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported, node);\n }\n}\n\nexport function ExportNamespaceSpecifier(\n this: Printer,\n node: t.ExportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported, node);\n}\n\nexport function _printAssertions(\n this: Printer,\n node: Extract,\n) {\n this.word(\"assert\");\n this.space();\n this.token(\"{\");\n this.space();\n this.printList(node.assertions, node);\n this.space();\n this.token(\"}\");\n}\n\nexport function ExportAllDeclaration(\n this: Printer,\n node: t.ExportAllDeclaration | t.DeclareExportAllDeclaration,\n) {\n this.word(\"export\");\n this.space();\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n this.token(\"*\");\n this.space();\n this.word(\"from\");\n this.space();\n // @ts-expect-error Fixme: assertions is not defined in DeclareExportAllDeclaration\n if (node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n // @ts-expect-error Fixme: assertions is not defined in DeclareExportAllDeclaration\n this._printAssertions(node);\n } else {\n this.print(node.source, node);\n }\n\n this.semicolon();\n}\n\nfunction maybePrintDecoratorsBeforeExport(\n printer: Printer,\n node: t.ExportNamedDeclaration | t.ExportDefaultDeclaration,\n) {\n if (\n isClassDeclaration(node.declaration) &&\n printer._shouldPrintDecoratorsBeforeExport(\n node as t.ExportNamedDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n printer.printJoin(node.declaration.decorators, node);\n }\n}\n\nexport function ExportNamedDeclaration(\n this: Printer,\n node: t.ExportNamedDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.space();\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n\n // print \"special\" specifiers first\n let hasSpecial = false;\n for (;;) {\n const first = specifiers[0];\n if (\n isExportDefaultSpecifier(first) ||\n isExportNamespaceSpecifier(first)\n ) {\n hasSpecial = true;\n this.print(specifiers.shift(), node);\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n if (specifiers.length || (!specifiers.length && !hasSpecial)) {\n this.token(\"{\");\n if (specifiers.length) {\n this.space();\n this.printList(specifiers, node);\n this.space();\n }\n this.token(\"}\");\n }\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n if (node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n this._printAssertions(node);\n } else {\n this.print(node.source, node);\n }\n }\n\n this.semicolon();\n }\n}\n\nexport function ExportDefaultDeclaration(\n this: Printer,\n node: t.ExportDefaultDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.noIndentInnerCommentsHere();\n this.space();\n this.word(\"default\");\n this.space();\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n}\n\nexport function ImportDeclaration(this: Printer, node: t.ImportDeclaration) {\n this.word(\"import\");\n this.space();\n\n const isTypeKind = node.importKind === \"type\" || node.importKind === \"typeof\";\n if (isTypeKind) {\n this.noIndentInnerCommentsHere();\n this.word(node.importKind);\n this.space();\n } else if (node.module) {\n this.noIndentInnerCommentsHere();\n this.word(\"module\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n const hasSpecifiers = !!specifiers.length;\n // print \"special\" specifiers first. The loop condition is constant,\n // but there is a \"break\" in the body.\n while (hasSpecifiers) {\n const first = specifiers[0];\n if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n this.print(specifiers.shift(), node);\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n if (specifiers.length) {\n this.token(\"{\");\n this.space();\n this.printList(specifiers, node);\n this.space();\n this.token(\"}\");\n } else if (isTypeKind && !hasSpecifiers) {\n this.token(\"{\");\n this.token(\"}\");\n }\n\n if (hasSpecifiers || isTypeKind) {\n this.space();\n this.word(\"from\");\n this.space();\n }\n\n if (node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n this._printAssertions(node);\n } else {\n this.print(node.source, node);\n }\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 supports module attributes\n if (node.attributes?.length) {\n this.space();\n this.word(\"with\");\n this.space();\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 supports module attributes\n this.printList(node.attributes, node);\n }\n }\n\n this.semicolon();\n}\n\nexport function ImportAttribute(this: Printer, node: t.ImportAttribute) {\n this.print(node.key);\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ImportNamespaceSpecifier(\n this: Printer,\n node: t.ImportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local, node);\n}\n"],"mappings":";;;;;;;;;;;;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AA,gBAAA,GAAI5C,IAAI,CAAC6C,UAAU,aAAfD,gBAAA,CAAiBxB,MAAM,EAAE;MAC3B,IAAI,CAACjB,KAAK,EAAE;MACZ,IAAI,CAACD,IAAI,CAAC,MAAM,CAAC;MACjB,IAAI,CAACC,KAAK,EAAE;MAEZ,IAAI,CAACa,SAAS,CAAChB,IAAI,CAAC6C,UAAU,EAAE7C,IAAI,CAAC;IACvC;EACF;EAEA,IAAI,CAACsB,SAAS,EAAE;AAClB;AAEO,SAASwB,eAAeA,CAAgB9C,IAAuB,EAAE;EACtE,IAAI,CAACI,KAAK,CAACJ,IAAI,CAAC+C,GAAG,CAAC;EACpB,IAAI,CAACjC,SAAK,IAAK;EACf,IAAI,CAACX,KAAK,EAAE;EACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACgD,KAAK,CAAC;AACxB;AAEO,SAASC,wBAAwBA,CAEtCjD,IAAgC,EAChC;EACA,IAAI,CAACc,SAAK,IAAK;EACf,IAAI,CAACX,KAAK,EAAE;EACZ,IAAI,CAACD,IAAI,CAAC,IAAI,CAAC;EACf,IAAI,CAACC,KAAK,EAAE;EACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACM,KAAK,EAAEN,IAAI,CAAC;AAC9B"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/statements.js b/node_modules/@babel/generator/lib/generators/statements.js index 72a9e7e1d..1512cf431 100644 --- a/node_modules/@babel/generator/lib/generators/statements.js +++ b/node_modules/@babel/generator/lib/generators/statements.js @@ -62,7 +62,6 @@ function IfStatement(node) { this.printAndIndentOnComments(node.alternate, node); } } - function getLastStatement(statement) { const { body @@ -168,7 +167,6 @@ function TryStatement(node) { this.space(); this.print(node.block, node); this.space(); - if (node.handlers) { this.print(node.handlers[0], node); } else { @@ -248,7 +246,6 @@ function VariableDeclaration(node, parent) { } } } - this.printList(node.declarations, node, { separator: hasInits ? function () { this.tokenChar(44); diff --git a/node_modules/@babel/generator/lib/generators/statements.js.map b/node_modules/@babel/generator/lib/generators/statements.js.map index a165f35d1..338c896e7 100644 --- a/node_modules/@babel/generator/lib/generators/statements.js.map +++ b/node_modules/@babel/generator/lib/generators/statements.js.map @@ -1 +1 @@ -{"version":3,"names":["isFor","isForStatement","isIfStatement","isStatement","WithStatement","node","word","space","token","print","object","printBlock","IfStatement","test","needsBlock","alternate","getLastStatement","consequent","newline","indent","printAndIndentOnComments","dedent","endsWith","statement","body","ForStatement","inForStatementInitCounter","init","update","WhileStatement","ForXStatement","isForOf","type","await","noIndentInnerCommentsHere","left","right","ForInStatement","ForOfStatement","DoWhileStatement","semicolon","printStatementAfterKeyword","printer","parent","isLabel","printTerminatorless","BreakStatement","label","ContinueStatement","ReturnStatement","argument","ThrowStatement","LabeledStatement","TryStatement","block","handlers","handler","finalizer","CatchClause","param","typeAnnotation","SwitchStatement","discriminant","printSequence","cases","addNewlines","leading","cas","length","SwitchCase","DebuggerStatement","VariableDeclaration","declare","kind","hasInits","declar","declarations","printList","separator","undefined","VariableDeclarator","id","definite"],"sources":["../../src/generators/statements.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isFor,\n isForStatement,\n isIfStatement,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nexport function WithStatement(this: Printer, node: t.WithStatement) {\n this.word(\"with\");\n this.space();\n this.token(\"(\");\n this.print(node.object, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function IfStatement(this: Printer, node: t.IfStatement) {\n this.word(\"if\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.space();\n\n const needsBlock =\n node.alternate && isIfStatement(getLastStatement(node.consequent));\n if (needsBlock) {\n this.token(\"{\");\n this.newline();\n this.indent();\n }\n\n this.printAndIndentOnComments(node.consequent, node);\n\n if (needsBlock) {\n this.dedent();\n this.newline();\n this.token(\"}\");\n }\n\n if (node.alternate) {\n if (this.endsWith(charCodes.rightCurlyBrace)) this.space();\n this.word(\"else\");\n this.space();\n this.printAndIndentOnComments(node.alternate, node);\n }\n}\n\n// Recursively get the last statement.\nfunction getLastStatement(statement: t.Statement): t.Statement {\n // @ts-expect-error: If statement.body is empty or not a Node, isStatement will return false\n const { body } = statement;\n if (isStatement(body) === false) {\n return statement;\n }\n\n return getLastStatement(body);\n}\n\nexport function ForStatement(this: Printer, node: t.ForStatement) {\n this.word(\"for\");\n this.space();\n this.token(\"(\");\n\n this.inForStatementInitCounter++;\n this.print(node.init, node);\n this.inForStatementInitCounter--;\n this.token(\";\");\n\n if (node.test) {\n this.space();\n this.print(node.test, node);\n }\n this.token(\";\");\n\n if (node.update) {\n this.space();\n this.print(node.update, node);\n }\n\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function WhileStatement(this: Printer, node: t.WhileStatement) {\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nfunction ForXStatement(this: Printer, node: t.ForXStatement) {\n this.word(\"for\");\n this.space();\n const isForOf = node.type === \"ForOfStatement\";\n if (isForOf && node.await) {\n this.word(\"await\");\n this.space();\n }\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n this.print(node.left, node);\n this.space();\n this.word(isForOf ? \"of\" : \"in\");\n this.space();\n this.print(node.right, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport const ForInStatement = ForXStatement;\nexport const ForOfStatement = ForXStatement;\n\nexport function DoWhileStatement(this: Printer, node: t.DoWhileStatement) {\n this.word(\"do\");\n this.space();\n this.print(node.body, node);\n this.space();\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.semicolon();\n}\n\nfunction printStatementAfterKeyword(\n printer: Printer,\n node: t.Node,\n parent: t.Node,\n isLabel: boolean,\n) {\n if (node) {\n printer.space();\n printer.printTerminatorless(node, parent, isLabel);\n }\n\n printer.semicolon();\n}\n\nexport function BreakStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"break\");\n printStatementAfterKeyword(this, node.label, node, true);\n}\n\nexport function ContinueStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"continue\");\n printStatementAfterKeyword(this, node.label, node, true);\n}\n\nexport function ReturnStatement(this: Printer, node: t.ReturnStatement) {\n this.word(\"return\");\n printStatementAfterKeyword(this, node.argument, node, false);\n}\n\nexport function ThrowStatement(this: Printer, node: t.ThrowStatement) {\n this.word(\"throw\");\n printStatementAfterKeyword(this, node.argument, node, false);\n}\n\nexport function LabeledStatement(this: Printer, node: t.LabeledStatement) {\n this.print(node.label, node);\n this.token(\":\");\n this.space();\n this.print(node.body, node);\n}\n\nexport function TryStatement(this: Printer, node: t.TryStatement) {\n this.word(\"try\");\n this.space();\n this.print(node.block, node);\n this.space();\n\n // Esprima bug puts the catch clause in a `handlers` array.\n // see https://code.google.com/p/esprima/issues/detail?id=433\n // We run into this from regenerator generated ast.\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n if (node.handlers) {\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n this.print(node.handlers[0], node);\n } else {\n this.print(node.handler, node);\n }\n\n if (node.finalizer) {\n this.space();\n this.word(\"finally\");\n this.space();\n this.print(node.finalizer, node);\n }\n}\n\nexport function CatchClause(this: Printer, node: t.CatchClause) {\n this.word(\"catch\");\n this.space();\n if (node.param) {\n this.token(\"(\");\n this.print(node.param, node);\n this.print(node.param.typeAnnotation, node);\n this.token(\")\");\n this.space();\n }\n this.print(node.body, node);\n}\n\nexport function SwitchStatement(this: Printer, node: t.SwitchStatement) {\n this.word(\"switch\");\n this.space();\n this.token(\"(\");\n this.print(node.discriminant, node);\n this.token(\")\");\n this.space();\n this.token(\"{\");\n\n this.printSequence(node.cases, node, {\n indent: true,\n addNewlines(leading, cas) {\n if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n },\n });\n\n this.token(\"}\");\n}\n\nexport function SwitchCase(this: Printer, node: t.SwitchCase) {\n if (node.test) {\n this.word(\"case\");\n this.space();\n this.print(node.test, node);\n this.token(\":\");\n } else {\n this.word(\"default\");\n this.token(\":\");\n }\n\n if (node.consequent.length) {\n this.newline();\n this.printSequence(node.consequent, node, { indent: true });\n }\n}\n\nexport function DebuggerStatement(this: Printer) {\n this.word(\"debugger\");\n this.semicolon();\n}\n\nexport function VariableDeclaration(\n this: Printer,\n node: t.VariableDeclaration,\n parent: t.Node,\n) {\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n const { kind } = node;\n this.word(kind, kind === \"using\");\n this.space();\n\n let hasInits = false;\n // don't add whitespace to loop heads\n if (!isFor(parent)) {\n for (const declar of node.declarations) {\n if (declar.init) {\n // has an init so let's split it up over multiple lines\n hasInits = true;\n }\n }\n }\n\n //\n // use a pretty separator when we aren't in compact mode, have initializers and don't have retainLines on\n // this will format declarations like:\n //\n // let foo = \"bar\", bar = \"foo\";\n //\n // into\n //\n // let foo = \"bar\",\n // bar = \"foo\";\n //\n\n this.printList(node.declarations, node, {\n separator: hasInits\n ? function (this: Printer) {\n this.token(\",\");\n this.newline();\n }\n : undefined,\n indent: node.declarations.length > 1 ? true : false,\n });\n\n if (isFor(parent)) {\n // don't give semicolons to these nodes since they'll be inserted in the parent generator\n if (isForStatement(parent)) {\n if (parent.init === node) return;\n } else {\n if (parent.left === node) return;\n }\n }\n\n this.semicolon();\n}\n\nexport function VariableDeclarator(this: Printer, node: t.VariableDeclarator) {\n this.print(node.id, node);\n if (node.definite) this.token(\"!\"); // TS\n // @ts-expect-error todo(flow-ts) Property 'typeAnnotation' does not exist on type 'MemberExpression'.\n this.print(node.id.typeAnnotation, node);\n if (node.init) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.init, node);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;AAKsB;EAJpBA,KAAK;EACLC,cAAc;EACdC,aAAa;EACbC;AAAW;AAKN,SAASC,aAAa,CAAgBC,IAAqB,EAAE;EAClE,IAAI,CAACC,IAAI,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A,IAAI,CAAC6E,QAAQ,EAAE,IAAI,CAAC1E,SAAK,IAAK;EAElC,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAC4E,EAAE,CAACrB,cAAc,EAAEvD,IAAI,CAAC;EACxC,IAAIA,IAAI,CAACsB,IAAI,EAAE;IACb,IAAI,CAACpB,KAAK,EAAE;IACZ,IAAI,CAACC,SAAK,IAAK;IACf,IAAI,CAACD,KAAK,EAAE;IACZ,IAAI,CAACE,KAAK,CAACJ,IAAI,CAACsB,IAAI,EAAEtB,IAAI,CAAC;EAC7B;AACF"} \ No newline at end of file +{"version":3,"names":["_t","require","isFor","isForStatement","isIfStatement","isStatement","WithStatement","node","word","space","token","print","object","printBlock","IfStatement","test","needsBlock","alternate","getLastStatement","consequent","newline","indent","printAndIndentOnComments","dedent","endsWith","statement","body","ForStatement","inForStatementInitCounter","init","update","WhileStatement","ForXStatement","isForOf","type","await","noIndentInnerCommentsHere","left","right","ForInStatement","exports","ForOfStatement","DoWhileStatement","semicolon","printStatementAfterKeyword","printer","parent","isLabel","printTerminatorless","BreakStatement","label","ContinueStatement","ReturnStatement","argument","ThrowStatement","LabeledStatement","TryStatement","block","handlers","handler","finalizer","CatchClause","param","typeAnnotation","SwitchStatement","discriminant","printSequence","cases","addNewlines","leading","cas","length","SwitchCase","DebuggerStatement","VariableDeclaration","declare","kind","hasInits","declar","declarations","printList","separator","undefined","VariableDeclarator","id","definite"],"sources":["../../src/generators/statements.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isFor,\n isForStatement,\n isIfStatement,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nexport function WithStatement(this: Printer, node: t.WithStatement) {\n this.word(\"with\");\n this.space();\n this.token(\"(\");\n this.print(node.object, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function IfStatement(this: Printer, node: t.IfStatement) {\n this.word(\"if\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.space();\n\n const needsBlock =\n node.alternate && isIfStatement(getLastStatement(node.consequent));\n if (needsBlock) {\n this.token(\"{\");\n this.newline();\n this.indent();\n }\n\n this.printAndIndentOnComments(node.consequent, node);\n\n if (needsBlock) {\n this.dedent();\n this.newline();\n this.token(\"}\");\n }\n\n if (node.alternate) {\n if (this.endsWith(charCodes.rightCurlyBrace)) this.space();\n this.word(\"else\");\n this.space();\n this.printAndIndentOnComments(node.alternate, node);\n }\n}\n\n// Recursively get the last statement.\nfunction getLastStatement(statement: t.Statement): t.Statement {\n // @ts-expect-error: If statement.body is empty or not a Node, isStatement will return false\n const { body } = statement;\n if (isStatement(body) === false) {\n return statement;\n }\n\n return getLastStatement(body);\n}\n\nexport function ForStatement(this: Printer, node: t.ForStatement) {\n this.word(\"for\");\n this.space();\n this.token(\"(\");\n\n this.inForStatementInitCounter++;\n this.print(node.init, node);\n this.inForStatementInitCounter--;\n this.token(\";\");\n\n if (node.test) {\n this.space();\n this.print(node.test, node);\n }\n this.token(\";\");\n\n if (node.update) {\n this.space();\n this.print(node.update, node);\n }\n\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function WhileStatement(this: Printer, node: t.WhileStatement) {\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nfunction ForXStatement(this: Printer, node: t.ForXStatement) {\n this.word(\"for\");\n this.space();\n const isForOf = node.type === \"ForOfStatement\";\n if (isForOf && node.await) {\n this.word(\"await\");\n this.space();\n }\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n this.print(node.left, node);\n this.space();\n this.word(isForOf ? \"of\" : \"in\");\n this.space();\n this.print(node.right, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport const ForInStatement = ForXStatement;\nexport const ForOfStatement = ForXStatement;\n\nexport function DoWhileStatement(this: Printer, node: t.DoWhileStatement) {\n this.word(\"do\");\n this.space();\n this.print(node.body, node);\n this.space();\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.semicolon();\n}\n\nfunction printStatementAfterKeyword(\n printer: Printer,\n node: t.Node,\n parent: t.Node,\n isLabel: boolean,\n) {\n if (node) {\n printer.space();\n printer.printTerminatorless(node, parent, isLabel);\n }\n\n printer.semicolon();\n}\n\nexport function BreakStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"break\");\n printStatementAfterKeyword(this, node.label, node, true);\n}\n\nexport function ContinueStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"continue\");\n printStatementAfterKeyword(this, node.label, node, true);\n}\n\nexport function ReturnStatement(this: Printer, node: t.ReturnStatement) {\n this.word(\"return\");\n printStatementAfterKeyword(this, node.argument, node, false);\n}\n\nexport function ThrowStatement(this: Printer, node: t.ThrowStatement) {\n this.word(\"throw\");\n printStatementAfterKeyword(this, node.argument, node, false);\n}\n\nexport function LabeledStatement(this: Printer, node: t.LabeledStatement) {\n this.print(node.label, node);\n this.token(\":\");\n this.space();\n this.print(node.body, node);\n}\n\nexport function TryStatement(this: Printer, node: t.TryStatement) {\n this.word(\"try\");\n this.space();\n this.print(node.block, node);\n this.space();\n\n // Esprima bug puts the catch clause in a `handlers` array.\n // see https://code.google.com/p/esprima/issues/detail?id=433\n // We run into this from regenerator generated ast.\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n if (node.handlers) {\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n this.print(node.handlers[0], node);\n } else {\n this.print(node.handler, node);\n }\n\n if (node.finalizer) {\n this.space();\n this.word(\"finally\");\n this.space();\n this.print(node.finalizer, node);\n }\n}\n\nexport function CatchClause(this: Printer, node: t.CatchClause) {\n this.word(\"catch\");\n this.space();\n if (node.param) {\n this.token(\"(\");\n this.print(node.param, node);\n this.print(node.param.typeAnnotation, node);\n this.token(\")\");\n this.space();\n }\n this.print(node.body, node);\n}\n\nexport function SwitchStatement(this: Printer, node: t.SwitchStatement) {\n this.word(\"switch\");\n this.space();\n this.token(\"(\");\n this.print(node.discriminant, node);\n this.token(\")\");\n this.space();\n this.token(\"{\");\n\n this.printSequence(node.cases, node, {\n indent: true,\n addNewlines(leading, cas) {\n if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n },\n });\n\n this.token(\"}\");\n}\n\nexport function SwitchCase(this: Printer, node: t.SwitchCase) {\n if (node.test) {\n this.word(\"case\");\n this.space();\n this.print(node.test, node);\n this.token(\":\");\n } else {\n this.word(\"default\");\n this.token(\":\");\n }\n\n if (node.consequent.length) {\n this.newline();\n this.printSequence(node.consequent, node, { indent: true });\n }\n}\n\nexport function DebuggerStatement(this: Printer) {\n this.word(\"debugger\");\n this.semicolon();\n}\n\nexport function VariableDeclaration(\n this: Printer,\n node: t.VariableDeclaration,\n parent: t.Node,\n) {\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n const { kind } = node;\n this.word(kind, kind === \"using\");\n this.space();\n\n let hasInits = false;\n // don't add whitespace to loop heads\n if (!isFor(parent)) {\n for (const declar of node.declarations) {\n if (declar.init) {\n // has an init so let's split it up over multiple lines\n hasInits = true;\n }\n }\n }\n\n //\n // use a pretty separator when we aren't in compact mode, have initializers and don't have retainLines on\n // this will format declarations like:\n //\n // let foo = \"bar\", bar = \"foo\";\n //\n // into\n //\n // let foo = \"bar\",\n // bar = \"foo\";\n //\n\n this.printList(node.declarations, node, {\n separator: hasInits\n ? function (this: Printer) {\n this.token(\",\");\n this.newline();\n }\n : undefined,\n indent: node.declarations.length > 1 ? true : false,\n });\n\n if (isFor(parent)) {\n // don't give semicolons to these nodes since they'll be inserted in the parent generator\n if (isForStatement(parent)) {\n if (parent.init === node) return;\n } else {\n if (parent.left === node) return;\n }\n }\n\n this.semicolon();\n}\n\nexport function VariableDeclarator(this: Printer, node: t.VariableDeclarator) {\n this.print(node.id, node);\n if (node.definite) this.token(\"!\"); // TS\n // @ts-expect-error todo(flow-ts) Property 'typeAnnotation' does not exist on type 'MemberExpression'.\n this.print(node.id.typeAnnotation, node);\n if (node.init) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.init, node);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAKsB;EAJpBC,KAAK;EACLC,cAAc;EACdC,aAAa;EACbC;AAAW,IAAAL,EAAA;AAKN,SAASM,aAAaA,CAAgBC,IAAqB,EAAE;EAClE,IAAI,CAACC,IAAI,CAAC,MAAM,CAAC;EACjB,IAAI,CAACC,KAAK,EAAE;EACZ,IAAI,CAACC,SAAK,IAAK;EACf,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,MAAM,EAAEL,IAAI,CAAC;EAC7B,IAAI,CAACG,SAAK,IAAK;EACf,IAAI,CAACG,UAAU,CAACN,IAAI,CAAC;AACvB;AAEO,SAASO,WAAWA,CAAgBP,IAAmB,EAAE;EAC9D,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC;EACf,IAAI,CAACC,KAAK,EAAE;EACZ,IAAI,CAACC,SAAK,IAAK;EACf,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACQ,IAAI,EAAER,IAAI,CAAC;EAC3B,IAAI,CAACG,SAAK,IAAK;EACf,IAAI,CAACD,KAAK,EAAE;EAEZ,MAAMO,UAAU,GACdT,IAAI,CAACU,SAAS,IAAIb,aAAa,CAACc,gBAAgB,CAACX,IAAI,CAACY,UAAU,CAAC,CAAC;EACpE,IAAIH,UAAU,EAAE;IACd,IAAI,CAACN,SAAK,KAAK;IACf,IAAI,CAACU,OAAO,EAAE;IACd,IAAI,CAACC,MAAM,EAAE;EACf;EAEA,IAAI,CAACC,wBAAwB,CAACf,IAAI,CAACY,UAAU,EAAEZ,IAAI,CAAC;EAEpD,IAAIS,UAAU,EAAE;IACd,IAAI,CAACO,MAAM,EAAE;IACb,IAAI,CAACH,OAAO,EAAE;IACd,IAAI,CAACV,SAAK,KAAK;EACjB;EAEA,IAAIH,IAAI,CAACU,SAAS,EAAE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4C,MAAM,CAAC,EAAE;IAEjB,IAAI3C,cAAc,CAAC2C,MAAM,CAAC,EAAE;MAC1B,IAAIA,MAAM,CAACjB,IAAI,KAAKtB,IAAI,EAAE;IAC5B,CAAC,MAAM;MACL,IAAIuC,MAAM,CAACT,IAAI,KAAK9B,IAAI,EAAE;IAC5B;EACF;EAEA,IAAI,CAACoC,SAAS,EAAE;AAClB;AAEO,SAASwC,kBAAkBA,CAAgB5E,IAA0B,EAAE;EAC5E,IAAI,CAACI,KAAK,CAACJ,IAAI,CAAC6E,EAAE,EAAE7E,IAAI,CAAC;EACzB,IAAIA,IAAI,CAAC8E,QAAQ,EAAE,IAAI,CAAC3E,SAAK,IAAK;EAElC,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAC6E,EAAE,CAACrB,cAAc,EAAExD,IAAI,CAAC;EACxC,IAAIA,IAAI,CAACsB,IAAI,EAAE;IACb,IAAI,CAACpB,KAAK,EAAE;IACZ,IAAI,CAACC,SAAK,IAAK;IACf,IAAI,CAACD,KAAK,EAAE;IACZ,IAAI,CAACE,KAAK,CAACJ,IAAI,CAACsB,IAAI,EAAEtB,IAAI,CAAC;EAC7B;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js.map b/node_modules/@babel/generator/lib/generators/template-literals.js.map index 6d89ddbe9..a056f8715 100644 --- a/node_modules/@babel/generator/lib/generators/template-literals.js.map +++ b/node_modules/@babel/generator/lib/generators/template-literals.js.map @@ -1 +1 @@ -{"version":3,"names":["TaggedTemplateExpression","node","print","tag","typeParameters","quasi","TemplateElement","parent","isFirst","quasis","isLast","length","value","raw","token","TemplateLiteral","i","expressions"],"sources":["../../src/generators/template-literals.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function TaggedTemplateExpression(\n this: Printer,\n node: t.TaggedTemplateExpression,\n) {\n this.print(node.tag, node);\n this.print(node.typeParameters, node); // TS\n this.print(node.quasi, node);\n}\n\nexport function TemplateElement(\n this: Printer,\n node: t.TemplateElement,\n parent: t.TemplateLiteral,\n) {\n const isFirst = parent.quasis[0] === node;\n const isLast = parent.quasis[parent.quasis.length - 1] === node;\n\n const value = (isFirst ? \"`\" : \"}\") + node.value.raw + (isLast ? \"`\" : \"${\");\n\n this.token(value, true);\n}\n\nexport function TemplateLiteral(this: Printer, node: t.TemplateLiteral) {\n const quasis = node.quasis;\n\n for (let i = 0; i < quasis.length; i++) {\n this.print(quasis[i], node);\n\n if (i + 1 < quasis.length) {\n this.print(node.expressions[i], node);\n }\n }\n}\n"],"mappings":";;;;;;;;AAGO,SAASA,wBAAwB,CAEtCC,IAAgC,EAChC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,GAAG,EAAEF,IAAI,CAAC;EAC1B,IAAI,CAACC,KAAK,CAACD,IAAI,CAACG,cAAc,EAAEH,IAAI,CAAC;EACrC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACI,KAAK,EAAEJ,IAAI,CAAC;AAC9B;AAEO,SAASK,eAAe,CAE7BL,IAAuB,EACvBM,MAAyB,EACzB;EACA,MAAMC,OAAO,GAAGD,MAAM,CAACE,MAAM,CAAC,CAAC,CAAC,KAAKR,IAAI;EACzC,MAAMS,MAAM,GAAGH,MAAM,CAACE,MAAM,CAACF,MAAM,CAACE,MAAM,CAACE,MAAM,GAAG,CAAC,CAAC,KAAKV,IAAI;EAE/D,MAAMW,KAAK,GAAG,CAACJ,OAAO,GAAG,GAAG,GAAG,GAAG,IAAIP,IAAI,CAACW,KAAK,CAACC,GAAG,IAAIH,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC;EAE5E,IAAI,CAACI,KAAK,CAACF,KAAK,EAAE,IAAI,CAAC;AACzB;AAEO,SAASG,eAAe,CAAgBd,IAAuB,EAAE;EACtE,MAAMQ,MAAM,GAAGR,IAAI,CAACQ,MAAM;EAE1B,KAAK,IAAIO,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,MAAM,CAACE,MAAM,EAAEK,CAAC,EAAE,EAAE;IACtC,IAAI,CAACd,KAAK,CAACO,MAAM,CAACO,CAAC,CAAC,EAAEf,IAAI,CAAC;IAE3B,IAAIe,CAAC,GAAG,CAAC,GAAGP,MAAM,CAACE,MAAM,EAAE;MACzB,IAAI,CAACT,KAAK,CAACD,IAAI,CAACgB,WAAW,CAACD,CAAC,CAAC,EAAEf,IAAI,CAAC;IACvC;EACF;AACF"} \ No newline at end of file +{"version":3,"names":["TaggedTemplateExpression","node","print","tag","typeParameters","quasi","TemplateElement","parent","isFirst","quasis","isLast","length","value","raw","token","TemplateLiteral","i","expressions"],"sources":["../../src/generators/template-literals.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function TaggedTemplateExpression(\n this: Printer,\n node: t.TaggedTemplateExpression,\n) {\n this.print(node.tag, node);\n this.print(node.typeParameters, node); // TS\n this.print(node.quasi, node);\n}\n\nexport function TemplateElement(\n this: Printer,\n node: t.TemplateElement,\n parent: t.TemplateLiteral,\n) {\n const isFirst = parent.quasis[0] === node;\n const isLast = parent.quasis[parent.quasis.length - 1] === node;\n\n const value = (isFirst ? \"`\" : \"}\") + node.value.raw + (isLast ? \"`\" : \"${\");\n\n this.token(value, true);\n}\n\nexport function TemplateLiteral(this: Printer, node: t.TemplateLiteral) {\n const quasis = node.quasis;\n\n for (let i = 0; i < quasis.length; i++) {\n this.print(quasis[i], node);\n\n if (i + 1 < quasis.length) {\n this.print(node.expressions[i], node);\n }\n }\n}\n"],"mappings":";;;;;;;;AAGO,SAASA,wBAAwBA,CAEtCC,IAAgC,EAChC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,GAAG,EAAEF,IAAI,CAAC;EAC1B,IAAI,CAACC,KAAK,CAACD,IAAI,CAACG,cAAc,EAAEH,IAAI,CAAC;EACrC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACI,KAAK,EAAEJ,IAAI,CAAC;AAC9B;AAEO,SAASK,eAAeA,CAE7BL,IAAuB,EACvBM,MAAyB,EACzB;EACA,MAAMC,OAAO,GAAGD,MAAM,CAACE,MAAM,CAAC,CAAC,CAAC,KAAKR,IAAI;EACzC,MAAMS,MAAM,GAAGH,MAAM,CAACE,MAAM,CAACF,MAAM,CAACE,MAAM,CAACE,MAAM,GAAG,CAAC,CAAC,KAAKV,IAAI;EAE/D,MAAMW,KAAK,GAAG,CAACJ,OAAO,GAAG,GAAG,GAAG,GAAG,IAAIP,IAAI,CAACW,KAAK,CAACC,GAAG,IAAIH,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC;EAE5E,IAAI,CAACI,KAAK,CAACF,KAAK,EAAE,IAAI,CAAC;AACzB;AAEO,SAASG,eAAeA,CAAgBd,IAAuB,EAAE;EACtE,MAAMQ,MAAM,GAAGR,IAAI,CAACQ,MAAM;EAE1B,KAAK,IAAIO,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,MAAM,CAACE,MAAM,EAAEK,CAAC,EAAE,EAAE;IACtC,IAAI,CAACd,KAAK,CAACO,MAAM,CAACO,CAAC,CAAC,EAAEf,IAAI,CAAC;IAE3B,IAAIe,CAAC,GAAG,CAAC,GAAGP,MAAM,CAACE,MAAM,EAAE;MACzB,IAAI,CAACT,KAAK,CAACD,IAAI,CAACgB,WAAW,CAACD,CAAC,CAAC,EAAEf,IAAI,CAAC;IACvC;EACF;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/types.js b/node_modules/@babel/generator/lib/generators/types.js index a13edbbd7..e02aa9814 100644 --- a/node_modules/@babel/generator/lib/generators/types.js +++ b/node_modules/@babel/generator/lib/generators/types.js @@ -30,6 +30,8 @@ const { isIdentifier } = _t; function Identifier(node) { + var _node$loc; + this.sourceIdentifierName(((_node$loc = node.loc) == null ? void 0 : _node$loc.identifierName) || node.name); this.word(node.name); } function ArgumentPlaceholder() { @@ -66,13 +68,11 @@ function ObjectProperty(node) { this.print(node.key, node); this.tokenChar(93); } else { - if (isAssignmentPattern(node.value) && isIdentifier(node.key) && - node.key.name === node.value.left.name) { + if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) { this.print(node.value, node); return; } this.print(node.key, node); - if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) { return; } @@ -175,10 +175,8 @@ function StringLiteral(node) { this.token(raw); return; } - const val = _jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && { - json: true - })); - return this.token(val); + const val = _jsesc(node.value, this.format.jsescOption); + this.token(val); } function BigIntLiteral(node) { const raw = this.getPossibleRaw(node); @@ -196,7 +194,6 @@ function DecimalLiteral(node) { } this.word(node.value + "m"); } - const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]); function TopicReference() { const { @@ -210,7 +207,6 @@ function TopicReference() { throw new Error(`The "topicToken" generator option must be one of ` + `${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`); } } - function PipelineTopicExpression(node) { this.print(node.expression, node); } diff --git a/node_modules/@babel/generator/lib/generators/types.js.map b/node_modules/@babel/generator/lib/generators/types.js.map index 5b0afb5ee..9af2a163a 100644 --- a/node_modules/@babel/generator/lib/generators/types.js.map +++ b/node_modules/@babel/generator/lib/generators/types.js.map @@ -1 +1 @@ -{"version":3,"names":["isAssignmentPattern","isIdentifier","Identifier","node","word","name","ArgumentPlaceholder","token","RestElement","print","argument","ObjectExpression","props","properties","length","space","printList","indent","statement","sourceWithOffset","loc","ObjectMethod","printJoin","decorators","_methodHead","body","ObjectProperty","computed","key","value","left","shorthand","ArrayExpression","elems","elements","len","i","elem","RecordExpression","startToken","endToken","format","recordAndTupleSyntaxType","Error","JSON","stringify","TupleExpression","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","jsescOption","numbers","number","jsesc","minified","StringLiteral","undefined","val","Object","assign","jsonCompatibleStrings","json","BigIntLiteral","DecimalLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","validTopics","Array","from","v","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n this.word(node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.token(\"}\");\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators, node);\n this._methodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators, node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value, node);\n return;\n }\n\n this.print(node.key, node);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.token(\",\");\n }\n }\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n this.token(endToken);\n}\n\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n }\n }\n\n this.token(endToken);\n}\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value + \"\";\n if (opts.numbers) {\n this.number(jsesc(node.value, opts));\n } else if (raw == null) {\n this.number(value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < value.length ? raw : value);\n } else {\n this.number(raw);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(\n node.value,\n process.env.BABEL_8_BREAKING\n ? this.format.jsescOption\n : Object.assign(\n this.format.jsescOption,\n this.format.jsonCompatibleStrings && { json: true },\n ),\n );\n\n return this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\nexport function DecimalLiteral(this: Printer, node: t.DecimalLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\"^^\", \"@@\", \"^\", \"%\", \"#\"]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression, node);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee, node);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {\n this.token(\"#\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAEA;AAA0B;EAFjBA,mBAAmB;EAAEC;AAAY;AAInC,SAASC,UAAU,CAAgBC,IAAkB,EAAE;EAC5D,IAAI,CAACC,IAAI,CAACD,IAAI,CAACE,IAAI,CAAC;AACtB;AAEO,SAASC,mBAAmB,GAAgB;EACjD,IAAI,CAACC,SAAK,IAAK;AACjB;AAEO,SAASC,WAAW,CAAgBL,IAAmB,EAAE;EAC9D,IAAI,CAACI,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,CAACE,KAAK,CAACN,IAAI,CAACO,QAAQ,EAAEP,IAAI,CAAC;AACjC;AAIO,SAASQ,gBAAgB,CAAgBR,IAAwB,EAAE;EACxE,MAAMS,KAAK,GAAGT,IAAI,CAACU,UAAU;EAE7B,IAAI,CAACN,SAAK,KAAK;EAEf,IAAIK,KAAK,CAACE,MAAM,EAAE;IAChB,IAAI,CAACC,KAAK,EAAE;IACZ,IAAI,CAACC,SAAS,CAACJ,KAAK,EAAET,IAAI,EAAE;MAAEc,MAAM,EAAE,IAAI;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;IAC9D,IAAI,CAACH,KAAK,EAAE;EACd;EAEA,IAAI,CAACI,gBAAgB,CAAC,KAAK,EAAEhB,IAAI,CAACiB,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;EAE7C,IAAI,CAACb,SAAK,KAAK;AACjB;AAIO,SAASc,YAAY,CAAgBlB,IAAoB,EAAE;EAChE,IAAI,CAACmB,SAAS,CAACnB,IAAI,CAACoB,UAAU,EAAEpB,IAAI,CAAC;EACrC,IAAI,CAACqB,WAAW,CAACrB,IAAI,CAAC;EACtB,IAAI,CAACY,KAA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C,MAAM;IACL,MAAME,mBAAmB,GAAG/B,IAAI,CAACC,SAAS,CAAC4B,UAAU,CAAC;IACtD,MAAMG,WAAW,GAAGC,KAAK,CAACC,IAAI,CAACR,kBAAkB,EAAES,CAAC,IAAInC,IAAI,CAACC,SAAS,CAACkC,CAAC,CAAC,CAAC;IAC1E,MAAM,IAAIpC,KAAK,CACZ,mDAAkD,GAChD,GAAEiC,WAAW,CAACI,IAAI,CAAC,IAAI,CAAE,KAAIL,mBAAoB,qBAAoB,CACzE;EACH;AACF;;AAGO,SAASM,uBAAuB,CAErC9E,IAA+B,EAC/B;EACA,IAAI,CAACM,KAAK,CAACN,IAAI,CAAC+E,UAAU,EAAE/E,IAAI,CAAC;AACnC;AAEO,SAASgF,oBAAoB,CAElChF,IAA4B,EAC5B;EACA,IAAI,CAACM,KAAK,CAACN,IAAI,CAACiF,MAAM,EAAEjF,IAAI,CAAC;AAC/B;AAEO,SAASkF,6BAA6B,GAAgB;EAC3D,IAAI,CAAC9E,SAAK,IAAK;AACjB"} \ No newline at end of file +{"version":3,"names":["_t","require","_jsesc","isAssignmentPattern","isIdentifier","Identifier","node","_node$loc","sourceIdentifierName","loc","identifierName","name","word","ArgumentPlaceholder","token","RestElement","print","argument","ObjectExpression","props","properties","length","space","printList","indent","statement","sourceWithOffset","ObjectMethod","printJoin","decorators","_methodHead","body","ObjectProperty","computed","key","value","left","shorthand","ArrayExpression","elems","elements","len","i","elem","RecordExpression","startToken","endToken","format","recordAndTupleSyntaxType","Error","JSON","stringify","TupleExpression","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","jsescOption","numbers","number","jsesc","minified","StringLiteral","undefined","val","BigIntLiteral","DecimalLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","validTopics","Array","from","v","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n this.sourceIdentifierName(\n // @ts-expect-error Undocumented property identifierName\n node.loc?.identifierName || node.name,\n );\n this.word(node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.token(\"}\");\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators, node);\n this._methodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators, node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value, node);\n return;\n }\n\n this.print(node.key, node);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.token(\",\");\n }\n }\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n this.token(endToken);\n}\n\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n }\n }\n\n this.token(endToken);\n}\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value + \"\";\n if (opts.numbers) {\n this.number(jsesc(node.value, opts));\n } else if (raw == null) {\n this.number(value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < value.length ? raw : value);\n } else {\n this.number(raw);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(node.value, this.format.jsescOption);\n\n this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\nexport function DecimalLiteral(this: Printer, node: t.DecimalLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\"^^\", \"@@\", \"^\", \"%\", \"#\"]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression, node);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee, node);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {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U,CAAC;EACxB,CAAC,MAAM;IACL,MAAME,mBAAmB,GAAG3B,IAAI,CAACC,SAAS,CAACwB,UAAU,CAAC;IACtD,MAAMG,WAAW,GAAGC,KAAK,CAACC,IAAI,CAACR,kBAAkB,EAAES,CAAC,IAAI/B,IAAI,CAACC,SAAS,CAAC8B,CAAC,CAAC,CAAC;IAC1E,MAAM,IAAIhC,KAAK,CACZ,mDAAkD,GAChD,GAAE6B,WAAW,CAACI,IAAI,CAAC,IAAI,CAAE,KAAIL,mBAAoB,qBAAoB,CACzE;EACH;AACF;AAGO,SAASM,uBAAuBA,CAErC7E,IAA+B,EAC/B;EACA,IAAI,CAACU,KAAK,CAACV,IAAI,CAAC8E,UAAU,EAAE9E,IAAI,CAAC;AACnC;AAEO,SAAS+E,oBAAoBA,CAElC/E,IAA4B,EAC5B;EACA,IAAI,CAACU,KAAK,CAACV,IAAI,CAACgF,MAAM,EAAEhF,IAAI,CAAC;AAC/B;AAEO,SAASiF,6BAA6BA,CAAA,EAAgB;EAC3D,IAAI,CAACzE,SAAK,IAAK;AACjB"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/typescript.js b/node_modules/@babel/generator/lib/generators/typescript.js index 56624653a..3a4dfcdf1 100644 --- a/node_modules/@babel/generator/lib/generators/typescript.js +++ b/node_modules/@babel/generator/lib/generators/typescript.js @@ -119,12 +119,12 @@ function TSParameterProperty(node) { } this._param(node.parameter); } -function TSDeclareFunction(node) { +function TSDeclareFunction(node, parent) { if (node.declare) { this.word("declare"); this.space(); } - this._functionHead(node); + this._functionHead(node, parent); this.tokenChar(59); } function TSDeclareMethod(node) { @@ -266,8 +266,7 @@ function tsPrintFunctionOrConstructorType(node) { const { typeParameters } = node; - const parameters = - node.parameters; + const parameters = node.parameters; this.print(typeParameters, node); this.tokenChar(40); this._parameters(parameters, node); @@ -275,8 +274,7 @@ function tsPrintFunctionOrConstructorType(node) { this.space(); this.token("=>"); this.space(); - const returnType = - node.typeAnnotation; + const returnType = node.typeAnnotation; this.print(returnType.typeAnnotation, node); } function TSTypeReference(node) { diff --git a/node_modules/@babel/generator/lib/generators/typescript.js.map b/node_modules/@babel/generator/lib/generators/typescript.js.map index fa65acce1..b7665a926 100644 --- a/node_modules/@babel/generator/lib/generators/typescript.js.map +++ b/node_modules/@babel/generator/lib/generators/typescript.js.map @@ -1 +1 @@ -{"version":3,"names":["TSTypeAnnotation","node","token","space","optional","print","typeAnnotation","TSTypeParameterInstantiation","parent","printList","params","type","length","TSTypeParameter","in","word","out","name","constraint","default","TSParameterProperty","accessibility","readonly","_param","parameter","TSDeclareFunction","declare","_functionHead","TSDeclareMethod","_classMethodHead","TSQualifiedName","left","right","TSCallSignatureDeclaration","tsPrintSignatureDeclarationBase","TSConstructSignatureDeclaration","TSPropertySignature","initializer","tsPrintPropertyOrMethodName","computed","key","TSMethodSignature","kind","TSIndexSignature","static","isStatic","_parameters","parameters","TSAnyKeyword","TSBigIntKeyword","TSUnknownKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword","TSIntrinsicKeyword","TSThisType","TSFunctionType","tsPrintFunctionOrConstructorType","TSConstructorType","abstract","typeParameters","returnType","TSTypeReference","typeName","TSTypePredicate","asserts","parameterName","TSTypeQuery","exprName","TSTypeLiteral","tsPrintTypeLiteralOrInterfaceBody","members","tsPrintBraced","printer","indent","newline","member","dedent","sourceWithOffset","loc","rightBrace","TSArrayType","elementType","TSTupleType","elementTypes","TSOptionalType","TSRestType","TSNamedTupleMember","label","TSUnionType","tsPrintUnionOrIntersectionType","TSIntersectionType","sep","printJoin","types","separator","TSConditionalType","checkType","extendsType","trueType","falseType","TSInferType","typeParameter","TSParenthesizedType","TSTypeOperator","operator","TSIndexedAccessType","objectType","indexType","TSMappedType","nameType","tokenIfPlusMinus","self","tok","TSLiteralType","literal","TSExpressionWithTypeArguments","expression","TSInterfaceDeclaration","id","extends","extendz","body","TSInterfaceBody","TSTypeAliasDeclaration","TSTypeExpression","forceParens","trailingComments","undefined","TSTypeAssertion","TSInstantiationExpression","TSEnumDeclaration","const","isConst","TSEnumMember","TSModuleDeclaration","global","TSModuleBlock","TSImportType","argument","qualifier","TSImportEqualsDeclaration","isExport","moduleReference","TSExternalModuleReference","TSNonNullExpression","TSExportAssignment","TSNamespaceExportDeclaration","tsPrintClassMemberModifiers","isField","override"],"sources":["../../src/generators/typescript.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function TSTypeAnnotation(this: Printer, node: t.TSTypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSTypeParameterInstantiation(\n this: Printer,\n node: t.TSTypeParameterInstantiation,\n parent: t.Node,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n if (parent.type === \"ArrowFunctionExpression\" && node.params.length === 1) {\n this.token(\",\");\n }\n this.token(\">\");\n}\n\nexport { TSTypeParameterInstantiation as TSTypeParameterDeclaration };\n\nexport function TSTypeParameter(this: Printer, node: t.TSTypeParameter) {\n if (node.in) {\n this.word(\"in\");\n this.space();\n }\n\n if (node.out) {\n this.word(\"out\");\n this.space();\n }\n\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (node.name as unknown as string)\n : (node.name as unknown as t.Identifier).name,\n );\n\n if (node.constraint) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.constraint, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function TSParameterProperty(\n this: Printer,\n node: t.TSParameterProperty,\n) {\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n\n if (node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n\n this._param(node.parameter);\n}\n\nexport function TSDeclareFunction(this: Printer, node: t.TSDeclareFunction) {\n if (node.declare) {\n this.word(\"declare\");\n this.space();\n }\n this._functionHead(node);\n this.token(\";\");\n}\n\nexport function TSDeclareMethod(this: Printer, node: t.TSDeclareMethod) {\n this._classMethodHead(node);\n this.token(\";\");\n}\n\nexport function TSQualifiedName(this: Printer, node: t.TSQualifiedName) {\n this.print(node.left, node);\n this.token(\".\");\n this.print(node.right, node);\n}\n\nexport function TSCallSignatureDeclaration(\n this: Printer,\n node: t.TSCallSignatureDeclaration,\n) {\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSConstructSignatureDeclaration(\n this: Printer,\n node: t.TSConstructSignatureDeclaration,\n) {\n this.word(\"new\");\n this.space();\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSPropertySignature(\n this: Printer,\n node: t.TSPropertySignature,\n) {\n const { readonly, initializer } = node;\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.print(node.typeAnnotation, node);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer, node);\n }\n this.token(\";\");\n}\n\nexport function tsPrintPropertyOrMethodName(\n this: Printer,\n node: t.TSPropertySignature | t.TSMethodSignature,\n) {\n if (node.computed) {\n this.token(\"[\");\n }\n this.print(node.key, node);\n if (node.computed) {\n this.token(\"]\");\n }\n if (node.optional) {\n this.token(\"?\");\n }\n}\n\nexport function TSMethodSignature(this: Printer, node: t.TSMethodSignature) {\n const { kind } = node;\n if (kind === \"set\" || kind === \"get\") {\n this.word(kind);\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSIndexSignature(this: Printer, node: t.TSIndexSignature) {\n const { readonly, static: isStatic } = node;\n if (isStatic) {\n this.word(\"static\");\n this.space();\n }\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.token(\"[\");\n this._parameters(node.parameters, node);\n this.token(\"]\");\n this.print(node.typeAnnotation, node);\n this.token(\";\");\n}\n\nexport function TSAnyKeyword(this: Printer) {\n this.word(\"any\");\n}\nexport function TSBigIntKeyword(this: Printer) {\n this.word(\"bigint\");\n}\nexport function TSUnknownKeyword(this: Printer) {\n this.word(\"unknown\");\n}\nexport function TSNumberKeyword(this: Printer) {\n this.word(\"number\");\n}\nexport function TSObjectKeyword(this: Printer) {\n this.word(\"object\");\n}\nexport function TSBooleanKeyword(this: Printer) {\n this.word(\"boolean\");\n}\nexport function TSStringKeyword(this: Printer) {\n this.word(\"string\");\n}\nexport function TSSymbolKeyword(this: Printer) {\n this.word(\"symbol\");\n}\nexport function TSVoidKeyword(this: Printer) {\n this.word(\"void\");\n}\nexport function TSUndefinedKeyword(this: Printer) {\n this.word(\"undefined\");\n}\nexport function TSNullKeyword(this: Printer) {\n this.word(\"null\");\n}\nexport function TSNeverKeyword(this: Printer) {\n this.word(\"never\");\n}\nexport function TSIntrinsicKeyword(this: Printer) {\n this.word(\"intrinsic\");\n}\n\nexport function TSThisType(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TSFunctionType(this: Printer, node: t.TSFunctionType) {\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function TSConstructorType(this: Printer, node: t.TSConstructorType) {\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n this.word(\"new\");\n this.space();\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function tsPrintFunctionOrConstructorType(\n this: Printer,\n node: t.TSFunctionType | t.TSConstructorType,\n) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.params\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.parameters;\n this.print(typeParameters, node);\n this.token(\"(\");\n this._parameters(parameters, node);\n this.token(\")\");\n this.space();\n this.token(\"=>\");\n this.space();\n const returnType = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeAnnotation;\n this.print(returnType.typeAnnotation, node);\n}\n\nexport function TSTypeReference(this: Printer, node: t.TSTypeReference) {\n this.print(node.typeName, node, true);\n this.print(node.typeParameters, node, true);\n}\n\nexport function TSTypePredicate(this: Printer, node: t.TSTypePredicate) {\n if (node.asserts) {\n this.word(\"asserts\");\n this.space();\n }\n this.print(node.parameterName);\n if (node.typeAnnotation) {\n this.space();\n this.word(\"is\");\n this.space();\n this.print(node.typeAnnotation.typeAnnotation);\n }\n}\n\nexport function TSTypeQuery(this: Printer, node: t.TSTypeQuery) {\n this.word(\"typeof\");\n this.space();\n this.print(node.exprName);\n\n if (node.typeParameters) {\n this.print(node.typeParameters, node);\n }\n}\n\nexport function TSTypeLiteral(this: Printer, node: t.TSTypeLiteral) {\n this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);\n}\n\nexport function tsPrintTypeLiteralOrInterfaceBody(\n this: Printer,\n members: t.TSTypeElement[],\n node: t.TSType | t.TSInterfaceBody,\n) {\n tsPrintBraced(this, members, node);\n}\n\nfunction tsPrintBraced(printer: Printer, members: t.Node[], node: t.Node) {\n printer.token(\"{\");\n if (members.length) {\n printer.indent();\n printer.newline();\n for (const member of members) {\n printer.print(member, node);\n //this.token(sep);\n printer.newline();\n }\n printer.dedent();\n }\n\n printer.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n printer.rightBrace();\n}\n\nexport function TSArrayType(this: Printer, node: t.TSArrayType) {\n this.print(node.elementType, node, true);\n\n this.token(\"[]\");\n}\n\nexport function TSTupleType(this: Printer, node: t.TSTupleType) {\n this.token(\"[\");\n this.printList(node.elementTypes, node);\n this.token(\"]\");\n}\n\nexport function TSOptionalType(this: Printer, node: t.TSOptionalType) {\n this.print(node.typeAnnotation, node);\n this.token(\"?\");\n}\n\nexport function TSRestType(this: Printer, node: t.TSRestType) {\n this.token(\"...\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSNamedTupleMember(this: Printer, node: t.TSNamedTupleMember) {\n this.print(node.label, node);\n if (node.optional) this.token(\"?\");\n this.token(\":\");\n this.space();\n this.print(node.elementType, node);\n}\n\nexport function TSUnionType(this: Printer, node: t.TSUnionType) {\n tsPrintUnionOrIntersectionType(this, node, \"|\");\n}\n\nexport function TSIntersectionType(this: Printer, node: t.TSIntersectionType) {\n tsPrintUnionOrIntersectionType(this, node, \"&\");\n}\n\nfunction tsPrintUnionOrIntersectionType(\n printer: Printer,\n node: t.TSUnionType | t.TSIntersectionType,\n sep: \"|\" | \"&\",\n) {\n printer.printJoin(node.types, node, {\n separator() {\n this.space();\n this.token(sep);\n this.space();\n },\n });\n}\n\nexport function TSConditionalType(this: Printer, node: t.TSConditionalType) {\n this.print(node.checkType);\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.extendsType);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.trueType);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.falseType);\n}\n\nexport function TSInferType(this: Printer, node: t.TSInferType) {\n this.token(\"infer\");\n this.space();\n this.print(node.typeParameter);\n}\n\nexport function TSParenthesizedType(\n this: Printer,\n node: t.TSParenthesizedType,\n) {\n this.token(\"(\");\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function TSTypeOperator(this: Printer, node: t.TSTypeOperator) {\n this.word(node.operator);\n this.space();\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSIndexedAccessType(\n this: Printer,\n node: t.TSIndexedAccessType,\n) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function TSMappedType(this: Printer, node: t.TSMappedType) {\n const { nameType, optional, readonly, typeParameter } = node;\n this.token(\"{\");\n this.space();\n if (readonly) {\n tokenIfPlusMinus(this, readonly);\n this.word(\"readonly\");\n this.space();\n }\n\n this.token(\"[\");\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (typeParameter.name as unknown as string)\n : (typeParameter.name as unknown as t.Identifier).name,\n );\n this.space();\n this.word(\"in\");\n this.space();\n this.print(typeParameter.constraint, typeParameter);\n\n if (nameType) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(nameType, node);\n }\n\n this.token(\"]\");\n\n if (optional) {\n tokenIfPlusMinus(this, optional);\n this.token(\"?\");\n }\n this.token(\":\");\n this.space();\n this.print(node.typeAnnotation, node);\n this.space();\n this.token(\"}\");\n}\n\nfunction tokenIfPlusMinus(self: Printer, tok: true | \"+\" | \"-\") {\n if (tok !== true) {\n self.token(tok);\n }\n}\n\nexport function TSLiteralType(this: Printer, node: t.TSLiteralType) {\n this.print(node.literal, node);\n}\n\nexport function TSExpressionWithTypeArguments(\n this: Printer,\n node: t.TSExpressionWithTypeArguments,\n) {\n this.print(node.expression, node);\n this.print(node.typeParameters, node);\n}\n\nexport function TSInterfaceDeclaration(\n this: Printer,\n node: t.TSInterfaceDeclaration,\n) {\n const { declare, id, typeParameters, extends: extendz, body } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"interface\");\n this.space();\n this.print(id, node);\n this.print(typeParameters, node);\n if (extendz?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(extendz, node);\n }\n this.space();\n this.print(body, node);\n}\n\nexport function TSInterfaceBody(this: Printer, node: t.TSInterfaceBody) {\n this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);\n}\n\nexport function TSTypeAliasDeclaration(\n this: Printer,\n node: t.TSTypeAliasDeclaration,\n) {\n const { declare, id, typeParameters, typeAnnotation } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"type\");\n this.space();\n this.print(id, node);\n this.print(typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(typeAnnotation, node);\n this.token(\";\");\n}\n\nfunction TSTypeExpression(\n this: Printer,\n node: t.TSAsExpression | t.TSSatisfiesExpression,\n) {\n const { type, expression, typeAnnotation } = node;\n const forceParens = !!expression.trailingComments?.length;\n this.print(expression, node, true, undefined, forceParens);\n this.space();\n this.word(type === \"TSAsExpression\" ? \"as\" : \"satisfies\");\n this.space();\n this.print(typeAnnotation, node);\n}\n\nexport {\n TSTypeExpression as TSAsExpression,\n TSTypeExpression as TSSatisfiesExpression,\n};\n\nexport function TSTypeAssertion(this: Printer, node: t.TSTypeAssertion) {\n const { typeAnnotation, expression } = node;\n this.token(\"<\");\n this.print(typeAnnotation, node);\n this.token(\">\");\n this.space();\n this.print(expression, node);\n}\n\nexport function TSInstantiationExpression(\n this: Printer,\n node: t.TSInstantiationExpression,\n) {\n this.print(node.expression, node);\n this.print(node.typeParameters, node);\n}\n\nexport function TSEnumDeclaration(this: Printer, node: t.TSEnumDeclaration) {\n const { declare, const: isConst, id, members } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n if (isConst) {\n this.word(\"const\");\n this.space();\n }\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.space();\n tsPrintBraced(this, members, node);\n}\n\nexport function TSEnumMember(this: Printer, node: t.TSEnumMember) {\n const { id, initializer } = node;\n this.print(id, node);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer, node);\n }\n this.token(\",\");\n}\n\nexport function TSModuleDeclaration(\n this: Printer,\n node: t.TSModuleDeclaration,\n) {\n const { declare, id } = node;\n\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n\n if (!node.global) {\n this.word(id.type === \"Identifier\" ? \"namespace\" : \"module\");\n this.space();\n }\n this.print(id, node);\n\n if (!node.body) {\n this.token(\";\");\n return;\n }\n\n let body = node.body;\n while (body.type === \"TSModuleDeclaration\") {\n this.token(\".\");\n this.print(body.id, body);\n body = body.body;\n }\n\n this.space();\n this.print(body, node);\n}\n\nexport function TSModuleBlock(this: Printer, node: t.TSModuleBlock) {\n tsPrintBraced(this, node.body, node);\n}\n\nexport function TSImportType(this: Printer, node: t.TSImportType) {\n const { argument, qualifier, typeParameters } = node;\n this.word(\"import\");\n this.token(\"(\");\n this.print(argument, node);\n this.token(\")\");\n if (qualifier) {\n this.token(\".\");\n this.print(qualifier, node);\n }\n if (typeParameters) {\n this.print(typeParameters, node);\n }\n}\n\nexport function TSImportEqualsDeclaration(\n this: Printer,\n node: t.TSImportEqualsDeclaration,\n) {\n const { isExport, id, moduleReference } = node;\n if (isExport) {\n this.word(\"export\");\n this.space();\n }\n this.word(\"import\");\n this.space();\n this.print(id, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(moduleReference, node);\n this.token(\";\");\n}\n\nexport function TSExternalModuleReference(\n this: Printer,\n node: t.TSExternalModuleReference,\n) {\n this.token(\"require(\");\n this.print(node.expression, node);\n this.token(\")\");\n}\n\nexport function TSNonNullExpression(\n this: Printer,\n node: t.TSNonNullExpression,\n) {\n this.print(node.expression, node);\n this.token(\"!\");\n}\n\nexport function TSExportAssignment(this: Printer, node: t.TSExportAssignment) {\n this.word(\"export\");\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.expression, node);\n this.token(\";\");\n}\n\nexport function TSNamespaceExportDeclaration(\n this: Printer,\n node: t.TSNamespaceExportDeclaration,\n) {\n this.word(\"export\");\n this.space();\n this.word(\"as\");\n this.space();\n this.word(\"namespace\");\n this.space();\n this.print(node.id, node);\n}\n\nexport function tsPrintSignatureDeclarationBase(this: Printer, node: any) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? node.params\n : node.parameters;\n this.print(typeParameters, node);\n this.token(\"(\");\n this._parameters(parameters, node);\n this.token(\")\");\n const returnType = process.env.BABEL_8_BREAKING\n ? node.returnType\n : node.typeAnnotation;\n this.print(returnType, node);\n}\n\nexport function tsPrintClassMemberModifiers(\n this: Printer,\n node:\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.TSDeclareMethod,\n) {\n const isField =\n node.type === \"ClassAccessorProperty\" || node.type === \"ClassProperty\";\n if (isField && node.declare) {\n this.word(\"declare\");\n this.space();\n }\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.override) {\n this.word(\"override\");\n this.space();\n }\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n if (isField && node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAASA,gBAAgB,CAAgBC,IAAwB,EAAE;EACxE,IAAI,CAACC,SAAK,IAAK;EACf,IAAI,CAACC,KAAK,EAAE;EAEZ,IAAIF,IAAI,CAACG,QAAQ,EAAE,IAAI,CAACF,SAAK,IAAK;EAClC,IAAI,CAACG,KAAK,CAACJ,IAAI,CAACK,cAAc,EAAEL,IAAI,CAAC;AACvC;AAEO,SAASM,4BAA4B,CAE1CN,IAAoC,EACpCO,MAAc,EACR;EACN,IAAI,CAACN,SAAK,IAAK;EACf,IAAI,CAACO,SAAS,CAACR,IAAI,CAACS,MAAM,EAAET,IAAI,EAAE,CAAC,CAAC,CAAC;EACrC,IAAIO,MAAM,CAACG,IAAI,KAAK,yBAAyB,IAAIV,IAAI,CAACS,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE;IACzE,IAAI,CAACV,SAAK,IAAK;EACjB;EACA,IAAI,CAACA,SAAK,IAAK;AACjB;AAIO,SAASW,eAAe,CAAgBZ,IAAuB,EAAE;EACtE,IAAIA,IAAI,CAACa,EAAE,EAAE;IACX,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC;IACf,IAAI,CAACZ,KAAK,EAAE;EACd;EAEA,IAAIF,IAAI,CAACe,GAAG,EAAE;IACZ,IAAI,CAACD,IAAI,CAAC,KAAK,CAAC;IAChB,IAAI,CAACZ,KAAK,EAAE;EACd;EAEA,IAAI,CAACY,IAAI,CAEFd,IAAI,CAACgB,IAAI,CA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,"names":["TSTypeAnnotation","node","token","space","optional","print","typeAnnotation","TSTypeParameterInstantiation","parent","printList","params","type","length","TSTypeParameter","in","word","out","name","constraint","default","TSParameterProperty","accessibility","readonly","_param","parameter","TSDeclareFunction","declare","_functionHead","TSDeclareMethod","_classMethodHead","TSQualifiedName","left","right","TSCallSignatureDeclaration","tsPrintSignatureDeclarationBase","TSConstructSignatureDeclaration","TSPropertySignature","initializer","tsPrintPropertyOrMethodName","computed","key","TSMethodSignature","kind","TSIndexSignature","static","isStatic","_parameters","parameters","TSAnyKeyword","TSBigIntKeyword","TSUnknownKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword","TSIntrinsicKeyword","TSThisType","TSFunctionType","tsPrintFunctionOrConstructorType","TSConstructorType","abstract","typeParameters","returnType","TSTypeReference","typeName","TSTypePredicate","asserts","parameterName","TSTypeQuery","exprName","TSTypeLiteral","tsPrintTypeLiteralOrInterfaceBody","members","tsPrintBraced","printer","indent","newline","member","dedent","sourceWithOffset","loc","rightBrace","TSArrayType","elementType","TSTupleType","elementTypes","TSOptionalType","TSRestType","TSNamedTupleMember","label","TSUnionType","tsPrintUnionOrIntersectionType","TSIntersectionType","sep","printJoin","types","separator","TSConditionalType","checkType","extendsType","trueType","falseType","TSInferType","typeParameter","TSParenthesizedType","TSTypeOperator","operator","TSIndexedAccessType","objectType","indexType","TSMappedType","nameType","tokenIfPlusMinus","self","tok","TSLiteralType","literal","TSExpressionWithTypeArguments","expression","TSInterfaceDeclaration","id","extends","extendz","body","TSInterfaceBody","TSTypeAliasDeclaration","TSTypeExpression","_expression$trailingC","forceParens","trailingComments","undefined","TSTypeAssertion","TSInstantiationExpression","TSEnumDeclaration","const","isConst","TSEnumMember","TSModuleDeclaration","global","TSModuleBlock","TSImportType","argument","qualifier","TSImportEqualsDeclaration","isExport","moduleReference","TSExternalModuleReference","TSNonNullExpression","TSExportAssignment","TSNamespaceExportDeclaration","tsPrintClassMemberModifiers","isField","override"],"sources":["../../src/generators/typescript.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport function TSTypeAnnotation(this: Printer, node: t.TSTypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSTypeParameterInstantiation(\n this: Printer,\n node: t.TSTypeParameterInstantiation,\n parent: t.Node,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n if (parent.type === \"ArrowFunctionExpression\" && node.params.length === 1) {\n this.token(\",\");\n }\n this.token(\">\");\n}\n\nexport { TSTypeParameterInstantiation as TSTypeParameterDeclaration };\n\nexport function TSTypeParameter(this: Printer, node: t.TSTypeParameter) {\n if (node.in) {\n this.word(\"in\");\n this.space();\n }\n\n if (node.out) {\n this.word(\"out\");\n this.space();\n }\n\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (node.name as unknown as string)\n : (node.name as unknown as t.Identifier).name,\n );\n\n if (node.constraint) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.constraint, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function TSParameterProperty(\n this: Printer,\n node: t.TSParameterProperty,\n) {\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n\n if (node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n\n this._param(node.parameter);\n}\n\nexport function TSDeclareFunction(\n this: Printer,\n node: t.TSDeclareFunction,\n parent: NodePath[\"parent\"],\n) {\n if (node.declare) {\n this.word(\"declare\");\n this.space();\n }\n this._functionHead(node, parent);\n this.token(\";\");\n}\n\nexport function TSDeclareMethod(this: Printer, node: t.TSDeclareMethod) {\n this._classMethodHead(node);\n this.token(\";\");\n}\n\nexport function TSQualifiedName(this: Printer, node: t.TSQualifiedName) {\n this.print(node.left, node);\n this.token(\".\");\n this.print(node.right, node);\n}\n\nexport function TSCallSignatureDeclaration(\n this: Printer,\n node: t.TSCallSignatureDeclaration,\n) {\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSConstructSignatureDeclaration(\n this: Printer,\n node: t.TSConstructSignatureDeclaration,\n) {\n this.word(\"new\");\n this.space();\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSPropertySignature(\n this: Printer,\n node: t.TSPropertySignature,\n) {\n const { readonly, initializer } = node;\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.print(node.typeAnnotation, node);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer, node);\n }\n this.token(\";\");\n}\n\nexport function tsPrintPropertyOrMethodName(\n this: Printer,\n node: t.TSPropertySignature | t.TSMethodSignature,\n) {\n if (node.computed) {\n this.token(\"[\");\n }\n this.print(node.key, node);\n if (node.computed) {\n this.token(\"]\");\n }\n if (node.optional) {\n this.token(\"?\");\n }\n}\n\nexport function TSMethodSignature(this: Printer, node: t.TSMethodSignature) {\n const { kind } = node;\n if (kind === \"set\" || kind === \"get\") {\n this.word(kind);\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSIndexSignature(this: Printer, node: t.TSIndexSignature) {\n const { readonly, static: isStatic } = node;\n if (isStatic) {\n this.word(\"static\");\n this.space();\n }\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.token(\"[\");\n this._parameters(node.parameters, node);\n this.token(\"]\");\n this.print(node.typeAnnotation, node);\n this.token(\";\");\n}\n\nexport function TSAnyKeyword(this: Printer) {\n this.word(\"any\");\n}\nexport function TSBigIntKeyword(this: Printer) {\n this.word(\"bigint\");\n}\nexport function TSUnknownKeyword(this: Printer) {\n this.word(\"unknown\");\n}\nexport function TSNumberKeyword(this: Printer) {\n this.word(\"number\");\n}\nexport function TSObjectKeyword(this: Printer) {\n this.word(\"object\");\n}\nexport function TSBooleanKeyword(this: Printer) {\n this.word(\"boolean\");\n}\nexport function TSStringKeyword(this: Printer) {\n this.word(\"string\");\n}\nexport function TSSymbolKeyword(this: Printer) {\n this.word(\"symbol\");\n}\nexport function TSVoidKeyword(this: Printer) {\n this.word(\"void\");\n}\nexport function TSUndefinedKeyword(this: Printer) {\n this.word(\"undefined\");\n}\nexport function TSNullKeyword(this: Printer) {\n this.word(\"null\");\n}\nexport function TSNeverKeyword(this: Printer) {\n this.word(\"never\");\n}\nexport function TSIntrinsicKeyword(this: Printer) {\n this.word(\"intrinsic\");\n}\n\nexport function TSThisType(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TSFunctionType(this: Printer, node: t.TSFunctionType) {\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function TSConstructorType(this: Printer, node: t.TSConstructorType) {\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n this.word(\"new\");\n this.space();\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function tsPrintFunctionOrConstructorType(\n this: Printer,\n node: t.TSFunctionType | t.TSConstructorType,\n) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.params\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.parameters;\n this.print(typeParameters, node);\n this.token(\"(\");\n this._parameters(parameters, node);\n this.token(\")\");\n this.space();\n this.token(\"=>\");\n this.space();\n const returnType = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeAnnotation;\n this.print(returnType.typeAnnotation, node);\n}\n\nexport function TSTypeReference(this: Printer, node: t.TSTypeReference) {\n this.print(node.typeName, node, true);\n this.print(node.typeParameters, node, true);\n}\n\nexport function TSTypePredicate(this: Printer, node: t.TSTypePredicate) {\n if (node.asserts) {\n this.word(\"asserts\");\n this.space();\n }\n this.print(node.parameterName);\n if (node.typeAnnotation) {\n this.space();\n this.word(\"is\");\n this.space();\n this.print(node.typeAnnotation.typeAnnotation);\n }\n}\n\nexport function TSTypeQuery(this: Printer, node: t.TSTypeQuery) {\n this.word(\"typeof\");\n this.space();\n this.print(node.exprName);\n\n if (node.typeParameters) {\n this.print(node.typeParameters, node);\n }\n}\n\nexport function TSTypeLiteral(this: Printer, node: t.TSTypeLiteral) {\n this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);\n}\n\nexport function tsPrintTypeLiteralOrInterfaceBody(\n this: Printer,\n members: t.TSTypeElement[],\n node: t.TSType | t.TSInterfaceBody,\n) {\n tsPrintBraced(this, members, node);\n}\n\nfunction tsPrintBraced(printer: Printer, members: t.Node[], node: t.Node) {\n printer.token(\"{\");\n if (members.length) {\n printer.indent();\n printer.newline();\n for (const member of members) {\n printer.print(member, node);\n //this.token(sep);\n printer.newline();\n }\n printer.dedent();\n }\n\n printer.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n printer.rightBrace();\n}\n\nexport function TSArrayType(this: Printer, node: t.TSArrayType) {\n this.print(node.elementType, node, true);\n\n this.token(\"[]\");\n}\n\nexport function TSTupleType(this: Printer, node: t.TSTupleType) {\n this.token(\"[\");\n this.printList(node.elementTypes, node);\n this.token(\"]\");\n}\n\nexport function TSOptionalType(this: Printer, node: t.TSOptionalType) {\n this.print(node.typeAnnotation, node);\n this.token(\"?\");\n}\n\nexport function TSRestType(this: Printer, node: t.TSRestType) {\n this.token(\"...\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSNamedTupleMember(this: Printer, node: t.TSNamedTupleMember) {\n this.print(node.label, node);\n if (node.optional) this.token(\"?\");\n this.token(\":\");\n this.space();\n this.print(node.elementType, node);\n}\n\nexport function TSUnionType(this: Printer, node: t.TSUnionType) {\n tsPrintUnionOrIntersectionType(this, node, \"|\");\n}\n\nexport function TSIntersectionType(this: Printer, node: t.TSIntersectionType) {\n tsPrintUnionOrIntersectionType(this, node, \"&\");\n}\n\nfunction tsPrintUnionOrIntersectionType(\n printer: Printer,\n node: t.TSUnionType | t.TSIntersectionType,\n sep: \"|\" | \"&\",\n) {\n printer.printJoin(node.types, node, {\n separator() {\n this.space();\n this.token(sep);\n this.space();\n },\n });\n}\n\nexport function TSConditionalType(this: Printer, node: t.TSConditionalType) {\n this.print(node.checkType);\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.extendsType);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.trueType);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.falseType);\n}\n\nexport function TSInferType(this: Printer, node: t.TSInferType) {\n this.token(\"infer\");\n this.space();\n this.print(node.typeParameter);\n}\n\nexport function TSParenthesizedType(\n this: Printer,\n node: t.TSParenthesizedType,\n) {\n this.token(\"(\");\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function TSTypeOperator(this: Printer, node: t.TSTypeOperator) {\n this.word(node.operator);\n this.space();\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSIndexedAccessType(\n this: Printer,\n node: t.TSIndexedAccessType,\n) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function TSMappedType(this: Printer, node: t.TSMappedType) {\n const { nameType, optional, readonly, typeParameter } = node;\n this.token(\"{\");\n this.space();\n if (readonly) {\n tokenIfPlusMinus(this, readonly);\n this.word(\"readonly\");\n this.space();\n }\n\n this.token(\"[\");\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (typeParameter.name as unknown as string)\n : (typeParameter.name as unknown as t.Identifier).name,\n );\n this.space();\n this.word(\"in\");\n this.space();\n this.print(typeParameter.constraint, typeParameter);\n\n if (nameType) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(nameType, node);\n }\n\n this.token(\"]\");\n\n if (optional) {\n tokenIfPlusMinus(this, optional);\n this.token(\"?\");\n }\n this.token(\":\");\n this.space();\n this.print(node.typeAnnotation, node);\n this.space();\n this.token(\"}\");\n}\n\nfunction tokenIfPlusMinus(self: Printer, tok: true | \"+\" | \"-\") {\n if (tok !== true) {\n self.token(tok);\n }\n}\n\nexport function TSLiteralType(this: Printer, node: t.TSLiteralType) {\n this.print(node.literal, node);\n}\n\nexport function TSExpressionWithTypeArguments(\n this: Printer,\n node: t.TSExpressionWithTypeArguments,\n) {\n this.print(node.expression, node);\n this.print(node.typeParameters, node);\n}\n\nexport function TSInterfaceDeclaration(\n this: Printer,\n node: t.TSInterfaceDeclaration,\n) {\n const { declare, id, typeParameters, extends: extendz, body } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"interface\");\n this.space();\n this.print(id, node);\n this.print(typeParameters, node);\n if (extendz?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(extendz, node);\n }\n this.space();\n this.print(body, node);\n}\n\nexport function TSInterfaceBody(this: Printer, node: t.TSInterfaceBody) {\n this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);\n}\n\nexport function TSTypeAliasDeclaration(\n this: Printer,\n node: t.TSTypeAliasDeclaration,\n) {\n const { declare, id, typeParameters, typeAnnotation } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"type\");\n this.space();\n this.print(id, node);\n this.print(typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(typeAnnotation, node);\n this.token(\";\");\n}\n\nfunction TSTypeExpression(\n this: Printer,\n node: t.TSAsExpression | t.TSSatisfiesExpression,\n) {\n const { type, expression, typeAnnotation } = node;\n const forceParens = !!expression.trailingComments?.length;\n this.print(expression, node, true, undefined, forceParens);\n this.space();\n this.word(type === \"TSAsExpression\" ? \"as\" : \"satisfies\");\n this.space();\n this.print(typeAnnotation, node);\n}\n\nexport {\n TSTypeExpression as TSAsExpression,\n TSTypeExpression as TSSatisfiesExpression,\n};\n\nexport function TSTypeAssertion(this: Printer, node: t.TSTypeAssertion) {\n const { typeAnnotation, expression } = node;\n this.token(\"<\");\n this.print(typeAnnotation, node);\n this.token(\">\");\n this.space();\n this.print(expression, node);\n}\n\nexport function TSInstantiationExpression(\n this: Printer,\n node: t.TSInstantiationExpression,\n) {\n this.print(node.expression, node);\n this.print(node.typeParameters, node);\n}\n\nexport function TSEnumDeclaration(this: Printer, node: t.TSEnumDeclaration) {\n const { declare, const: isConst, id, members } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n if (isConst) {\n this.word(\"const\");\n this.space();\n }\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.space();\n tsPrintBraced(this, members, node);\n}\n\nexport function TSEnumMember(this: Printer, node: t.TSEnumMember) {\n const { id, initializer } = node;\n this.print(id, node);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer, node);\n }\n this.token(\",\");\n}\n\nexport function TSModuleDeclaration(\n this: Printer,\n node: t.TSModuleDeclaration,\n) {\n const { declare, id } = node;\n\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n\n if (!node.global) {\n this.word(id.type === \"Identifier\" ? \"namespace\" : \"module\");\n this.space();\n }\n this.print(id, node);\n\n if (!node.body) {\n this.token(\";\");\n return;\n }\n\n let body = node.body;\n while (body.type === \"TSModuleDeclaration\") {\n this.token(\".\");\n this.print(body.id, body);\n body = body.body;\n }\n\n this.space();\n this.print(body, node);\n}\n\nexport function TSModuleBlock(this: Printer, node: t.TSModuleBlock) {\n tsPrintBraced(this, node.body, node);\n}\n\nexport function TSImportType(this: Printer, node: t.TSImportType) {\n const { argument, qualifier, typeParameters } = node;\n this.word(\"import\");\n this.token(\"(\");\n this.print(argument, node);\n this.token(\")\");\n if (qualifier) {\n this.token(\".\");\n this.print(qualifier, node);\n }\n if (typeParameters) {\n this.print(typeParameters, node);\n }\n}\n\nexport function TSImportEqualsDeclaration(\n this: Printer,\n node: t.TSImportEqualsDeclaration,\n) {\n const { isExport, id, moduleReference } = node;\n if (isExport) {\n this.word(\"export\");\n this.space();\n }\n this.word(\"import\");\n this.space();\n this.print(id, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(moduleReference, node);\n this.token(\";\");\n}\n\nexport function TSExternalModuleReference(\n this: Printer,\n node: t.TSExternalModuleReference,\n) {\n this.token(\"require(\");\n this.print(node.expression, node);\n this.token(\")\");\n}\n\nexport function TSNonNullExpression(\n this: Printer,\n node: t.TSNonNullExpression,\n) {\n this.print(node.expression, node);\n this.token(\"!\");\n}\n\nexport function TSExportAssignment(this: Printer, node: t.TSExportAssignment) {\n this.word(\"export\");\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.expression, node);\n this.token(\";\");\n}\n\nexport function TSNamespaceExportDeclaration(\n this: Printer,\n node: t.TSNamespaceExportDeclaration,\n) {\n this.word(\"export\");\n this.space();\n this.word(\"as\");\n this.space();\n this.word(\"namespace\");\n this.space();\n this.print(node.id, node);\n}\n\nexport function tsPrintSignatureDeclarationBase(this: Printer, node: any) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? node.params\n : node.parameters;\n this.print(typeParameters, node);\n this.token(\"(\");\n this._parameters(parameters, node);\n this.token(\")\");\n const returnType = process.env.BABEL_8_BREAKING\n ? node.returnType\n : node.typeAnnotation;\n this.print(returnType, node);\n}\n\nexport function tsPrintClassMemberModifiers(\n this: Printer,\n node:\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.TSDeclareMethod,\n) {\n const isField =\n node.type === \"ClassAccessorProperty\" || node.type === \"ClassProperty\";\n if (isField && node.declare) {\n this.word(\"declare\");\n this.space();\n }\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.override) {\n this.word(\"override\");\n this.space();\n }\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n if (isField && node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAASA,gBAAgBA,CAAgBC,IAAwB,EAAE;EACxE,IAAI,CAACC,SAAK,IAAK;EACf,IAAI,CAACC,KAAK,EAAE;EAEZ,IAAIF,IAAI,CAACG,QAAQ,EAAE,IAAI,CAACF,SAAK,IAAK;EAClC,IAAI,CAACG,KAAK,CAACJ,IAAI,CAACK,cAAc,EAAEL,IAAI,CAAC;AACvC;AAEO,SAASM,4BAA4BA,CAE1CN,IAAoC,EACpCO,MAAc,EACR;EACN,IAAI,CAACN,SAAK,IAAK;EACf,IAAI,CAACO,SAAS,CAACR,IAAI,CAACS,MAAM,EAAET,IAAI,EAAE,CAAC,CAAC,CAAC;EACrC,IAAIO,MAAM,CAACG,IAAI,KAAK,yBAAyB,IAAIV,IAAI,CAACS,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE;IACzE,IAAI,CAACV,SAAK,IAAK;EACjB;EACA,IAAI,CAACA,SAAK,IAAK;AACjB;AAIO,SAASW,eAAeA,CAAgBZ,IAAuB,EAAE;EACtE,IAAIA,IAAI,CAACa,EAAE,EAAE;IACX,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC;IACf,IAAI,CAACZ,KAAK,EAAE;EACd;EAEA,IAAIF,IAAI,CAACe,GAAG,EAAE;IACZ,IAAI,CAACD,IAAI,CAAC,KAAK,CAAC;IAChB,IAAI,CAACZ,KAAK,EAAE;EACd;EAEA,IAAI,CAACY,IAAI,CAEFd,IAAI,CAACgB,IAAI,CAEf;EAED,IAAIhB,IAAI,CAACiB,UAAU,EAAE;IACnB,IAAI,CAACf,KAAK,EAAE;IACZ,IAAI,CAACY,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACZ,KAAK,EAAE;IACZ,IA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,CAAC,UAAU,CAAC;IACrB,IAAI,CAACZ,KAAK,EAAE;EACd;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/generator/lib/index.js index 4fee1ef43..d0ef98628 100644 --- a/node_modules/@babel/generator/lib/index.js +++ b/node_modules/@babel/generator/lib/index.js @@ -7,7 +7,6 @@ exports.CodeGenerator = void 0; exports.default = generate; var _sourceMap = require("./source-map"); var _printer = require("./printer"); - class Generator extends _printer.default { constructor(ast, opts = {}, code) { const format = normalizeOptions(code, opts); @@ -16,12 +15,10 @@ class Generator extends _printer.default { this.ast = void 0; this.ast = ast; } - generate() { return super.generate(this.ast); } } - function normalizeOptions(code, opts) { const format = { auxiliaryCommentBefore: opts.auxiliaryCommentBefore, @@ -46,8 +43,8 @@ function normalizeOptions(code, opts) { topicToken: opts.topicToken }; { - format.decoratorsBeforeExport = !!opts.decoratorsBeforeExport; - format.jsonCompatibleStrings = opts.jsonCompatibleStrings; + format.decoratorsBeforeExport = opts.decoratorsBeforeExport; + format.jsescOption.json = opts.jsonCompatibleStrings; } if (format.minified) { format.compact = true; @@ -56,8 +53,7 @@ function normalizeOptions(code, opts) { format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.includes("@license") || value.includes("@preserve")); } if (format.compact === "auto") { - format.compact = code.length > 500000; - + format.compact = typeof code === "string" && code.length > 500000; if (format.compact) { console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`); } @@ -78,7 +74,6 @@ function normalizeOptions(code, opts) { } return format; } - class CodeGenerator { constructor(ast, opts, code) { this._generator = void 0; @@ -88,7 +83,6 @@ class CodeGenerator { return this._generator.generate(); } } - exports.CodeGenerator = CodeGenerator; function generate(ast, opts, code) { const gen = new Generator(ast, opts, code); diff --git a/node_modules/@babel/generator/lib/index.js.map b/node_modules/@babel/generator/lib/index.js.map index 61b9032d9..7e186c860 100644 --- a/node_modules/@babel/generator/lib/index.js.map +++ b/node_modules/@babel/generator/lib/index.js.map @@ -1 +1 @@ -{"version":3,"names":["Generator","Printer","constructor","ast","opts","code","format","normalizeOptions","map","sourceMaps","SourceMap","generate","auxiliaryCommentBefore","auxiliaryCommentAfter","shouldPrintComment","retainLines","retainFunctionParens","comments","compact","minified","concise","indent","adjustMultilineComment","style","jsescOption","quotes","wrap","minimal","recordAndTupleSyntaxType","topicToken","decoratorsBeforeExport","jsonCompatibleStrings","value","includes","length","console","error","filename","undefined","CodeGenerator","_generator","gen"],"sources":["../src/index.ts"],"sourcesContent":["import SourceMap from \"./source-map\";\nimport Printer from \"./printer\";\nimport type * as t from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\nimport type { Format } from \"./printer\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { DecodedSourceMap, Mapping } from \"@jridgewell/gen-mapping\";\n\n/**\n * Babel's code generator, turns an ast into code, maintaining sourcemaps,\n * user preferences, and valid output.\n */\n\nclass Generator extends Printer {\n constructor(\n ast: t.Node,\n opts: GeneratorOptions = {},\n code: string | { [filename: string]: string },\n ) {\n const format = normalizeOptions(code, opts);\n const map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n super(format, map);\n\n this.ast = ast;\n }\n\n ast: t.Node;\n\n /**\n * Generate code and sourcemap from ast.\n *\n * Appends comments that weren't attached to any node to the end of the generated output.\n */\n\n generate() {\n return super.generate(this.ast);\n }\n}\n\n/**\n * Normalize generator options, setting defaults.\n *\n * - Detects code indentation.\n * - If `opts.compact = \"auto\"` and the code is over 500KB, `compact` will be set to `true`.\n */\n\nfunction normalizeOptions(\n code: string | { [filename: string]: string },\n opts: GeneratorOptions,\n): Format {\n const format: Format = {\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n shouldPrintComment: opts.shouldPrintComment,\n retainLines: opts.retainLines,\n retainFunctionParens: opts.retainFunctionParens,\n comments: opts.comments == null || opts.comments,\n compact: opts.compact,\n minified: opts.minified,\n concise: opts.concise,\n indent: {\n adjustMultilineComment: true,\n style: \" \",\n },\n jsescOption: {\n quotes: \"double\",\n wrap: true,\n minimal: process.env.BABEL_8_BREAKING ? true : false,\n ...opts.jsescOption,\n },\n recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,\n topicToken: opts.topicToken,\n };\n\n if (!process.env.BABEL_8_BREAKING) {\n format.decoratorsBeforeExport = !!opts.decoratorsBeforeExport;\n format.jsonCompatibleStrings = opts.jsonCompatibleStrings;\n }\n\n if (format.minified) {\n format.compact = true;\n\n format.shouldPrintComment =\n format.shouldPrintComment || (() => format.comments);\n } else {\n format.shouldPrintComment =\n format.shouldPrintComment ||\n (value =>\n format.comments ||\n value.includes(\"@license\") ||\n value.includes(\"@preserve\"));\n }\n\n if (format.compact === \"auto\") {\n format.compact = code.length > 500_000; // 500KB\n\n if (format.compact) {\n console.error(\n \"[BABEL] Note: The code generator has deoptimised the styling of \" +\n `${opts.filename} as it exceeds the max of ${\"500KB\"}.`,\n );\n }\n }\n\n if (format.compact) {\n format.indent.adjustMultilineComment = false;\n }\n\n const { auxiliaryCommentBefore, auxiliaryCommentAfter, shouldPrintComment } =\n format;\n\n if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {\n format.auxiliaryCommentBefore = undefined;\n }\n if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {\n format.auxiliaryCommentAfter = undefined;\n }\n\n return format;\n}\n\nexport interface GeneratorOptions {\n /**\n * Optional string to add as a block comment at the start of the output file.\n */\n auxiliaryCommentBefore?: string;\n\n /**\n * Optional string to add as a block comment at the end of the output file.\n */\n auxiliaryCommentAfter?: string;\n\n /**\n * Function that takes a comment (as a string) and returns true if the comment should be included in the output.\n * By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment\n * contains `@preserve` or `@license`.\n */\n shouldPrintComment?(comment: string): boolean;\n\n /**\n * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).\n * Defaults to `false`.\n */\n retainLines?: boolean;\n\n /**\n * Retain parens around function expressions (could be used to change engine parsing behavior)\n * Defaults to `false`.\n */\n retainFunctionParens?: boolean;\n\n /**\n * Should comments be included in output? Defaults to `true`.\n */\n comments?: boolean;\n\n /**\n * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.\n */\n compact?: boolean | \"auto\";\n\n /**\n * Should the output be minified. Defaults to `false`.\n */\n minified?: boolean;\n\n /**\n * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.\n */\n concise?: boolean;\n\n /**\n * Used in warning messages\n */\n filename?: string;\n\n /**\n * Enable generating source maps. Defaults to `false`.\n */\n sourceMaps?: boolean;\n\n /**\n * A root for all relative URLs in the source map.\n */\n sourceRoot?: string;\n\n /**\n * The filename for the source code (i.e. the code in the `code` argument).\n * This will only be used if `code` is a string.\n */\n sourceFileName?: string;\n\n /**\n * Set to true to run jsesc with \"json\": true to print \"\\u00A9\" vs. \"©\";\n * @deprecated use `jsescOptions: { json: true }` instead\n */\n jsonCompatibleStrings?: boolean;\n\n /**\n * Set to true to enable support for experimental decorators syntax before module exports.\n * Defaults to `false`.\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n\n /**\n * Options for outputting jsesc representation.\n */\n jsescOption?: jsescOptions;\n\n /**\n * For use with the recordAndTuple token.\n */\n recordAndTupleSyntaxType?: RecordAndTuplePluginOptions[\"syntaxType\"];\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n}\n\nexport interface GeneratorResult {\n code: string;\n map: {\n version: number;\n sources: readonly string[];\n names: readonly string[];\n sourceRoot?: string;\n sourcesContent?: readonly string[];\n mappings: string;\n file?: string;\n } | null;\n decodedMap: DecodedSourceMap | undefined;\n rawMappings: Mapping[] | undefined;\n}\n\n/**\n * We originally exported the Generator class above, but to make it extra clear that it is a private API,\n * we have moved that to an internal class instance and simplified the interface to the two public methods\n * that we wish to support.\n */\n\nexport class CodeGenerator {\n private _generator: Generator;\n constructor(ast: t.Node, opts?: GeneratorOptions, code?: string) {\n this._generator = new Generator(ast, opts, code);\n }\n generate(): GeneratorResult {\n return this._generator.generate();\n }\n}\n\n/**\n * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.\n * @param ast - the abstract syntax tree from which to generate output code.\n * @param opts - used for specifying options for code generation.\n * @param code - the original source code, used for source maps.\n * @returns - an object containing the output code and source map.\n */\nexport default function generate(\n ast: t.Node,\n opts?: GeneratorOptions,\n code?: string | { [filename: string]: string },\n) {\n const gen = new Generator(ast, opts, code);\n return gen.generate();\n}\n"],"mappings":";;;;;;;AAAA;AACA;;AAeA,MAAMA,SAAS,SAASC,gBAAO,CAAC;EAC9BC,WAAW,CACTC,GAAW,EACXC,IAAsB,GAAG,CAAC,CAAC,EAC3BC,IAA6C,EAC7C;IACA,MAAMC,MAAM,GAAGC,gBAAgB,CAACF,IAAI,EAAED,IAAI,CAAC;IAC3C,MAAMI,GAAG,GAAGJ,IAAI,CAACK,UAAU,GAAG,IAAIC,kBAAS,CAACN,IAAI,EAAEC,IAAI,CAAC,GAAG,IAAI;IAC9D,KAAK,CAACC,MAAM,EAAEE,GAAG,CAAC;IAAC,KAKrBL,GAAG;IAHD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB;;EAUAQ,QAAQ,GAAG;IACT,OAAO,KAAK,CAACA,QAAQ,CAAC,IAAI,CAACR,GAAG,CAAC;EACjC;AACF;;AASA,SAASI,gBAAgB,CACvBF,IAA6C,EAC7CD,IAAsB,EACd;EACR,MAAME,MAAc,GAAG;IACrBM,sBAAsB,EAAER,IAAI,CAACQ,sBAAsB;IACnDC,qBAAqB,EAAET,IAAI,CAACS,qBAAqB;IACjDC,kBAAkB,EAAEV,IAAI,CAACU,kBAAkB;IAC3CC,WAAW,EAAEX,IAAI,CAACW,WAAW;IAC7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MAClBiB,OAAO,CAACC,KAAK,CACX,kEAAkE,GAC/D,GAAEhC,IAAI,CAACiC,QAAS,6BAA4B,OAAQ,GAAE,CAC1D;IACH;EACF;EAEA,IAAI/B,MAAM,CAACY,OAAO,EAAE;IAClBZ,MAAM,CAACe,MAAM,CAACC,sBAAsB,GAAG,KAAK;EAC9C;EAEA,MAAM;IAAEV,sBAAsB;IAAEC,qBAAqB;IAAEC;EAAmB,CAAC,GACzER,MAAM;EAER,IAAIM,sBAAsB,IAAI,CAACE,kBAAkB,CAACF,sBAAsB,CAAC,EAAE;IACzEN,MAAM,CAACM,sBAAsB,GAAG0B,SAAS;EAC3C;EACA,IAAIzB,qBAAqB,IAAI,CAACC,kBAAkB,CAACD,qBAAqB,CAAC,EAAE;IACvEP,MAAM,CAACO,qBAAqB,GAAGyB,SAAS;EAC1C;EAEA,OAAOhC,MAAM;AACf;;AA2HO,MAAMiC,aAAa,CAAC;EAEzBrC,WAAW,CAACC,GAAW,EAAEC,IAAuB,EAAEC,IAAa,EAAE;IAAA,KADzDmC,UAAU;IAEhB,IAAI,CAACA,UAAU,GAAG,IAAIxC,SAAS,CAACG,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;EAClD;EACAM,QAAQ,GAAoB;IAC1B,OAAO,IAAI,CAAC6B,UAAU,CAAC7B,QAAQ,EAAE;EACnC;AACF;;AAAC;AASc,SAASA,QAAQ,CAC9BR,GAAW,EACXC,IAAuB,EACvBC,IAA8C,EAC9C;EACA,MAAMoC,GAAG,GAAG,IAAIzC,SAAS,CAACG,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;EAC1C,OAAOoC,GAAG,CAAC9B,QAAQ,EAAE;AACvB"} \ No newline at end of file +{"version":3,"names":["_sourceMap","require","_printer","Generator","Printer","constructor","ast","opts","code","format","normalizeOptions","map","sourceMaps","SourceMap","generate","auxiliaryCommentBefore","auxiliaryCommentAfter","shouldPrintComment","retainLines","retainFunctionParens","comments","compact","minified","concise","indent","adjustMultilineComment","style","jsescOption","Object","assign","quotes","wrap","minimal","recordAndTupleSyntaxType","topicToken","decoratorsBeforeExport","json","jsonCompatibleStrings","value","includes","length","console","error","filename","undefined","CodeGenerator","_generator","exports","gen"],"sources":["../src/index.ts"],"sourcesContent":["import SourceMap from \"./source-map\";\nimport Printer from \"./printer\";\nimport type * as t from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\nimport type { Format } from \"./printer\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { DecodedSourceMap, Mapping } from \"@jridgewell/gen-mapping\";\n\n/**\n * Babel's code generator, turns an ast into code, maintaining sourcemaps,\n * user preferences, and valid output.\n */\n\nclass Generator extends Printer {\n constructor(\n ast: t.Node,\n opts: GeneratorOptions = {},\n code: string | { [filename: string]: string },\n ) {\n const format = normalizeOptions(code, opts);\n const map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n super(format, map);\n\n this.ast = ast;\n }\n\n ast: t.Node;\n\n /**\n * Generate code and sourcemap from ast.\n *\n * Appends comments that weren't attached to any node to the end of the generated output.\n */\n\n generate() {\n return super.generate(this.ast);\n }\n}\n\n/**\n * Normalize generator options, setting defaults.\n *\n * - Detects code indentation.\n * - If `opts.compact = \"auto\"` and the code is over 500KB, `compact` will be set to `true`.\n */\n\nfunction normalizeOptions(\n code: string | { [filename: string]: string },\n opts: GeneratorOptions,\n): Format {\n const format: Format = {\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n shouldPrintComment: opts.shouldPrintComment,\n retainLines: opts.retainLines,\n retainFunctionParens: opts.retainFunctionParens,\n comments: opts.comments == null || opts.comments,\n compact: opts.compact,\n minified: opts.minified,\n concise: opts.concise,\n indent: {\n adjustMultilineComment: true,\n style: \" \",\n },\n jsescOption: {\n quotes: \"double\",\n wrap: true,\n minimal: process.env.BABEL_8_BREAKING ? true : false,\n ...opts.jsescOption,\n },\n recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,\n topicToken: opts.topicToken,\n };\n\n if (!process.env.BABEL_8_BREAKING) {\n format.decoratorsBeforeExport = opts.decoratorsBeforeExport;\n format.jsescOption.json = opts.jsonCompatibleStrings;\n }\n\n if (format.minified) {\n format.compact = true;\n\n format.shouldPrintComment =\n format.shouldPrintComment || (() => format.comments);\n } else {\n format.shouldPrintComment =\n format.shouldPrintComment ||\n (value =>\n format.comments ||\n value.includes(\"@license\") ||\n value.includes(\"@preserve\"));\n }\n\n if (format.compact === \"auto\") {\n format.compact = typeof code === \"string\" && code.length > 500_000; // 500KB\n\n if (format.compact) {\n console.error(\n \"[BABEL] Note: The code generator has deoptimised the styling of \" +\n `${opts.filename} as it exceeds the max of ${\"500KB\"}.`,\n );\n }\n }\n\n if (format.compact) {\n format.indent.adjustMultilineComment = false;\n }\n\n const { auxiliaryCommentBefore, auxiliaryCommentAfter, shouldPrintComment } =\n format;\n\n if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {\n format.auxiliaryCommentBefore = undefined;\n }\n if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {\n format.auxiliaryCommentAfter = undefined;\n }\n\n return format;\n}\n\nexport interface GeneratorOptions {\n /**\n * Optional string to add as a block comment at the start of the output file.\n */\n auxiliaryCommentBefore?: string;\n\n /**\n * Optional string to add as a block comment at the end of the output file.\n */\n auxiliaryCommentAfter?: string;\n\n /**\n * Function that takes a comment (as a string) and returns true if the comment should be included in the output.\n * By default, comments are included if `opts.comments` is `true` or if `opts.minified` is `false` and the comment\n * contains `@preserve` or `@license`.\n */\n shouldPrintComment?(comment: string): boolean;\n\n /**\n * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).\n * Defaults to `false`.\n */\n retainLines?: boolean;\n\n /**\n * Retain parens around function expressions (could be used to change engine parsing behavior)\n * Defaults to `false`.\n */\n retainFunctionParens?: boolean;\n\n /**\n * Should comments be included in output? Defaults to `true`.\n */\n comments?: boolean;\n\n /**\n * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.\n */\n compact?: boolean | \"auto\";\n\n /**\n * Should the output be minified. Defaults to `false`.\n */\n minified?: boolean;\n\n /**\n * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.\n */\n concise?: boolean;\n\n /**\n * Used in warning messages\n */\n filename?: string;\n\n /**\n * Enable generating source maps. Defaults to `false`.\n */\n sourceMaps?: boolean;\n\n inputSourceMap?: any;\n\n /**\n * A root for all relative URLs in the source map.\n */\n sourceRoot?: string;\n\n /**\n * The filename for the source code (i.e. the code in the `code` argument).\n * This will only be used if `code` is a string.\n */\n sourceFileName?: string;\n\n /**\n * Set to true to run jsesc with \"json\": true to print \"\\u00A9\" vs. \"©\";\n * @deprecated use `jsescOptions: { json: true }` instead\n */\n jsonCompatibleStrings?: boolean;\n\n /**\n * Set to true to enable support for experimental decorators syntax before\n * module exports. If not specified, decorators will be printed in the same\n * position as they were in the input source code.\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n\n /**\n * Options for outputting jsesc representation.\n */\n jsescOption?: jsescOptions;\n\n /**\n * For use with the recordAndTuple token.\n */\n recordAndTupleSyntaxType?: RecordAndTuplePluginOptions[\"syntaxType\"];\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n}\n\nexport interface GeneratorResult {\n code: string;\n map: {\n version: number;\n sources: readonly string[];\n names: readonly string[];\n sourceRoot?: string;\n sourcesContent?: readonly string[];\n mappings: string;\n file?: string;\n } | null;\n decodedMap: DecodedSourceMap | undefined;\n rawMappings: Mapping[] | undefined;\n}\n\n/**\n * We originally exported the Generator class above, but to make it extra clear that it is a private API,\n * we have moved that to an internal class instance and simplified the interface to the two public methods\n * that we wish to support.\n */\n\nexport class CodeGenerator {\n private _generator: Generator;\n constructor(ast: t.Node, opts?: GeneratorOptions, code?: string) {\n this._generator = new Generator(ast, opts, code);\n }\n generate(): GeneratorResult {\n return this._generator.generate();\n }\n}\n\n/**\n * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.\n * @param ast - the abstract syntax tree from which to generate output code.\n * @param opts - used for specifying options for code generation.\n * @param code - the original source code, used for source maps.\n * @returns - an object containing the output code and source map.\n */\nexport default function generate(\n ast: t.Node,\n opts?: GeneratorOptions,\n code?: string | { [filename: string]: string },\n) {\n const gen = new Generator(ast, opts, code);\n return gen.generate();\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAeA,MAAME,SAAS,SAASC,gBAAO,CAAC;EAC9BC,WAAWA,CACTC,GAAW,EACXC,IAAsB,GAAG,CAAC,CAAC,EAC3BC,IAA6C,EAC7C;IACA,MAAMC,MAAM,GAAGC,gBAAgB,CAACF,IAAI,EAAED,IAAI,CAAC;IAC3C,MAAMI,GAAG,GAAGJ,IAAI,CAACK,UAAU,GAAG,IAAIC,kBAAS,CAACN,IAAI,EAAEC,IAAI,CAAC,GAAG,IAAI;IAC9D,KAAK,CAACC,MAAM,EAAEE,GAAG,CAAC;IAAC,KAKrBL,GAAG;IAHD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB;EAUAQ,QAAQA,CAAA,EAAG;IACT,OAAO,KAAK,CAACA,QAAQ,CAAC,IAAI,CAACR,GAAG,CAAC;EACjC;AACF;AASA,SAASI,gBAAgBA,CACvBF,IAA6C,EAC7CD,IAAsB,EACd;EACR,MAAME,MAAc,GAAG;IACrBM,sBAAsB,EAAER,IAAI,CAACQ,sBAAsB;IACnDC,qBAAqB,EAAET,IAAI,CAACS,qBAAqB;IACjDC,kBAAkB,EAAEV,IAAI,CAACU,kBAAkB;IAC3CC,WAAW,EAAEX,IAAI,CAACW,WAAW;IAC7BC,oBAAoB,EAAEZ,IAAI,CAACY,oBAAoB;IAC/CC,QAAQ,EAAEb,IAAI,CAACa,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C,KAAK,CACX,kEAAkE,GAC/D,GAAEnC,IAAI,CAACoC,QAAS,6BAA4B,OAAQ,GAAE,CAC1D;IACH;EACF;EAEA,IAAIlC,MAAM,CAACY,OAAO,EAAE;IAClBZ,MAAM,CAACe,MAAM,CAACC,sBAAsB,GAAG,KAAK;EAC9C;EAEA,MAAM;IAAEV,sBAAsB;IAAEC,qBAAqB;IAAEC;EAAmB,CAAC,GACzER,MAAM;EAER,IAAIM,sBAAsB,IAAI,CAACE,kBAAkB,CAACF,sBAAsB,CAAC,EAAE;IACzEN,MAAM,CAACM,sBAAsB,GAAG6B,SAAS;EAC3C;EACA,IAAI5B,qBAAqB,IAAI,CAACC,kBAAkB,CAACD,qBAAqB,CAAC,EAAE;IACvEP,MAAM,CAACO,qBAAqB,GAAG4B,SAAS;EAC1C;EAEA,OAAOnC,MAAM;AACf;AA8HO,MAAMoC,aAAa,CAAC;EAEzBxC,WAAWA,CAACC,GAAW,EAAEC,IAAuB,EAAEC,IAAa,EAAE;IAAA,KADzDsC,UAAU;IAEhB,IAAI,CAACA,UAAU,GAAG,IAAI3C,SAAS,CAACG,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;EAClD;EACAM,QAAQA,CAAA,EAAoB;IAC1B,OAAO,IAAI,CAACgC,UAAU,CAAChC,QAAQ,EAAE;EACnC;AACF;AAACiC,OAAA,CAAAF,aAAA,GAAAA,aAAA;AASc,SAAS/B,QAAQA,CAC9BR,GAAW,EACXC,IAAuB,EACvBC,IAA8C,EAC9C;EACA,MAAMwC,GAAG,GAAG,IAAI7C,SAAS,CAACG,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;EAC1C,OAAOwC,GAAG,CAAClC,QAAQ,EAAE;AACvB"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/index.js b/node_modules/@babel/generator/lib/node/index.js index d42879d9c..43d60ee84 100644 --- a/node_modules/@babel/generator/lib/node/index.js +++ b/node_modules/@babel/generator/lib/node/index.js @@ -38,7 +38,6 @@ function expandAliases(obj) { } return newObj; } - const expandedParens = expandAliases(parens); const expandedWhitespaceNodes = expandAliases(whitespace.nodes); function find(obj, node, parent, printStack) { diff --git a/node_modules/@babel/generator/lib/node/index.js.map b/node_modules/@babel/generator/lib/node/index.js.map index 2687e39d9..84984d566 100644 --- a/node_modules/@babel/generator/lib/node/index.js.map +++ b/node_modules/@babel/generator/lib/node/index.js.map @@ -1 +1 @@ -{"version":3,"names":["FLIPPED_ALIAS_KEYS","isCallExpression","isExpressionStatement","isMemberExpression","isNewExpression","expandAliases","obj","newObj","add","type","func","fn","node","parent","stack","result","Object","keys","aliases","alias","expandedParens","parens","expandedWhitespaceNodes","whitespace","nodes","find","printStack","isOrHasCallExpression","object","needsWhitespace","expression","flag","needsWhitespaceBefore","needsWhitespaceAfter","needsParens","callee"],"sources":["../../src/node/index.ts"],"sourcesContent":["import * as whitespace from \"./whitespace\";\nimport * as parens from \"./parentheses\";\nimport {\n FLIPPED_ALIAS_KEYS,\n isCallExpression,\n isExpressionStatement,\n isMemberExpression,\n isNewExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport type { WhitespaceFlag } from \"./whitespace\";\n\nexport type NodeHandlers = {\n [K in string]?: (\n node: K extends t.Node[\"type\"] ? Extract : t.Node,\n // todo:\n // node: K extends keyof typeof t\n // ? Extract\n // : t.Node,\n parent: t.Node,\n stack: t.Node[],\n ) => R;\n};\n\nfunction expandAliases(obj: NodeHandlers) {\n const newObj: NodeHandlers = {};\n\n function add(\n type: string,\n func: (node: t.Node, parent: t.Node, stack: t.Node[]) => R,\n ) {\n const fn = newObj[type];\n newObj[type] = fn\n ? function (node, parent, stack) {\n const result = fn(node, parent, stack);\n\n return result == null ? func(node, parent, stack) : result;\n }\n : func;\n }\n\n for (const type of Object.keys(obj)) {\n const aliases = FLIPPED_ALIAS_KEYS[type];\n if (aliases) {\n for (const alias of aliases) {\n add(alias, obj[type]);\n }\n } else {\n add(type, obj[type]);\n }\n }\n\n return newObj;\n}\n\n// Rather than using `t.is` on each object property, we pre-expand any type aliases\n// into concrete types so that the 'find' call below can be as fast as possible.\nconst expandedParens = expandAliases(parens);\nconst expandedWhitespaceNodes = expandAliases(whitespace.nodes);\n\nfunction find(\n obj: NodeHandlers,\n node: t.Node,\n parent: t.Node,\n printStack?: t.Node[],\n): R | null {\n const fn = obj[node.type];\n return fn ? fn(node, parent, printStack) : null;\n}\n\nfunction isOrHasCallExpression(node: t.Node): boolean {\n if (isCallExpression(node)) {\n return true;\n }\n\n return isMemberExpression(node) && isOrHasCallExpression(node.object);\n}\n\nexport function needsWhitespace(\n node: t.Node,\n parent: t.Node,\n type: WhitespaceFlag,\n): boolean {\n if (!node) return false;\n\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n const flag = find(expandedWhitespaceNodes, node, parent);\n\n if (typeof flag === \"number\") {\n return (flag & type) !== 0;\n }\n\n return false;\n}\n\nexport function needsWhitespaceBefore(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 1);\n}\n\nexport function needsWhitespaceAfter(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 2);\n}\n\nexport function needsParens(\n node: t.Node,\n parent: t.Node,\n printStack?: t.Node[],\n) {\n if (!parent) return false;\n\n if (isNewExpression(parent) && parent.callee === node) {\n if (isOrHasCallExpression(node)) return true;\n }\n\n return find(expandedParens, node, parent, printStack);\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AAMsB;EALpBA,kBAAkB;EAClBC,gBAAgB;EAChBC,qBAAqB;EACrBC,kBAAkB;EAClBC;AAAe;AAkBjB,SAASC,aAAa,CAAIC,GAAoB,EAAE;EAC9C,MAAMC,MAAuB,GAAG,CAAC,CAAC;EAElC,SAASC,GAAG,CACVC,IAAY,EACZC,IAA0D,EAC1D;IACA,MAAMC,EAAE,GAAGJ,MAAM,CAACE,IAAI,CAAC;IACvBF,MAAM,CAACE,IAAI,CAAC,GAAGE,EAAE,GACb,UAAUC,IAAI,EAAEC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,EACX;EACT,IAAI,CAACG,IAAI,EAAE,OAAO,KAAK;EAEvB,IAAIV,qBAAqB,CAACU,IAAI,CAAC,EAAE;IAC/BA,IAAI,GAAGA,IAAI,CAACkB,UAAU;EACxB;EAEA,MAAMC,IAAI,GAAGN,IAAI,CAACH,uBAAuB,EAAEV,IAAI,EAAEC,MAAM,CAAC;EAExD,IAAI,OAAOkB,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,CAACA,IAAI,GAAGtB,IAAI,MAAM,CAAC;EAC5B;EAEA,OAAO,KAAK;AACd;AAEO,SAASuB,qBAAqB,CAACpB,IAAY,EAAEC,MAAc,EAAE;EAClE,OAAOgB,eAAe,CAACjB,IAAI,EAAEC,MAAM,EAAE,CAAC,CAAC;AACzC;AAEO,SAASoB,oBAAoB,CAACrB,IAAY,EAAEC,MAAc,EAAE;EACjE,OAAOgB,eAAe,CAACjB,IAAI,EAAEC,MAAM,EAAE,CAAC,CAAC;AACzC;AAEO,SAASqB,WAAW,CACzBtB,IAAY,EACZC,MAAc,EACda,UAAqB,EACrB;EACA,IAAI,CAACb,MAAM,EAAE,OAAO,KAAK;EAEzB,IAAIT,eAAe,CAACS,MAAM,CAAC,IAAIA,MAAM,CAACsB,MAAM,KAAKvB,IAAI,EAAE;IACrD,IAAIe,qBAAqB,CAACf,IAAI,CAAC,EAAE,OAAO,IAAI;EAC9C;EAEA,OAAOa,IAAI,CAACL,cAAc,EAAER,IAAI,EAAEC,MAAM,EAAEa,UAAU,CAAC;AACvD"} \ No newline at end of file +{"version":3,"names":["whitespace","require","parens","_t","FLIPPED_ALIAS_KEYS","isCallExpression","isExpressionStatement","isMemberExpression","isNewExpression","expandAliases","obj","newObj","add","type","func","fn","node","parent","stack","result","Object","keys","aliases","alias","expandedParens","expandedWhitespaceNodes","nodes","find","printStack","isOrHasCallExpression","object","needsWhitespace","expression","flag","needsWhitespaceBefore","needsWhitespaceAfter","needsParens","callee"],"sources":["../../src/node/index.ts"],"sourcesContent":["import * as whitespace from \"./whitespace\";\nimport * as parens from \"./parentheses\";\nimport {\n FLIPPED_ALIAS_KEYS,\n isCallExpression,\n isExpressionStatement,\n isMemberExpression,\n isNewExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport type { WhitespaceFlag } from \"./whitespace\";\n\nexport type NodeHandlers = {\n [K in string]?: (\n node: K extends t.Node[\"type\"] ? Extract : t.Node,\n // todo:\n // node: K extends keyof typeof t\n // ? Extract\n // : t.Node,\n parent: t.Node,\n stack: t.Node[],\n ) => R;\n};\n\nfunction expandAliases(obj: NodeHandlers) {\n const newObj: NodeHandlers = {};\n\n function add(\n type: string,\n func: (node: t.Node, parent: t.Node, stack: t.Node[]) => R,\n ) {\n const fn = newObj[type];\n newObj[type] = fn\n ? function (node, parent, stack) {\n const result = fn(node, parent, stack);\n\n return result == null ? func(node, parent, stack) : result;\n }\n : func;\n }\n\n for (const type of Object.keys(obj)) {\n const aliases = FLIPPED_ALIAS_KEYS[type];\n if (aliases) {\n for (const alias of aliases) {\n add(alias, obj[type]);\n }\n } else {\n add(type, obj[type]);\n }\n }\n\n return newObj;\n}\n\n// Rather than using `t.is` on each object property, we pre-expand any type aliases\n// into concrete types so that the 'find' call below can be as fast as possible.\nconst expandedParens = expandAliases(parens);\nconst expandedWhitespaceNodes = expandAliases(whitespace.nodes);\n\nfunction find(\n obj: NodeHandlers,\n node: t.Node,\n parent: t.Node,\n printStack?: t.Node[],\n): R | null {\n const fn = obj[node.type];\n return fn ? fn(node, parent, printStack) : null;\n}\n\nfunction isOrHasCallExpression(node: t.Node): boolean {\n if (isCallExpression(node)) {\n return true;\n }\n\n return isMemberExpression(node) && isOrHasCallExpression(node.object);\n}\n\nexport function needsWhitespace(\n node: t.Node,\n parent: t.Node,\n type: WhitespaceFlag,\n): boolean {\n if (!node) return false;\n\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n const flag = find(expandedWhitespaceNodes, node, parent);\n\n if (typeof flag === \"number\") {\n return (flag & type) !== 0;\n }\n\n return false;\n}\n\nexport function needsWhitespaceBefore(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 1);\n}\n\nexport function needsWhitespaceAfter(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 2);\n}\n\nexport function needsParens(\n node: t.Node,\n parent: t.Node,\n printStack?: t.Node[],\n) {\n if (!parent) return false;\n\n if (isNewExpression(parent) && parent.callee === node) {\n if (isOrHasCallExpression(node)) return true;\n }\n\n return find(expandedParens, node, parent, printStack);\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAF,OAAA;AAMsB;EALpBG,kBAAkB;EAClBC,gBAAgB;EAChBC,qBAAqB;EACrBC,kBAAkB;EAClBC;AAAe,IAAAL,EAAA;AAkBjB,SAASM,aAAaA,CAAIC,GAAoB,EAAE;EAC9C,MAAMC,MAAuB,GAAG,CAAC,CAAC;EAElC,SAASC,GAAGA,CACVC,IAAY,EACZC,IAA0D,EAC1D;IACA,MAAMC,EAAE,GAAGJ,MAAM,CAACE,IAAI,CAAC;IACvBF,MAAM,CAACE,IAAI,CAAC,GAAGE,EAAE,GACb,UAAUC,IAAI,EAAEC,MAAM,EAAEC,KAAK,EAAE;MAC7B,MAAMC,MAAM,GAAGJ,EAAE,CAACC,IAAI,EAAEC,MAAM,EAAEC,KAAK,CAAC;MAEtC,OAAOC,MAAM,IAAI,IAAI,GAAGL,IAAI,CAACE,IAAI,EAAEC,MAAM,EAAEC,KAAK,CAAC,GAAGC,MAAM;IAC5D,CAAC,GACDL,IAAI;EACV;EAEA,KAAK,MAAMD,IAAI,IAAIO,MAAM,CAACC,IAAI,CAACX,GAAG,CAAC,EAAE;IACnC,MAAMY,OAAO,GAAGlB,kBAAkB,CAACS,IAAI,CAAC;IACxC,IAAIS,OAAO,EAAE;MACX,KAAK,MAAMC,KAAK,IAAID,OAAO,EAAE;QAC3BV,GAA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M,EAAE,CAAC,CAAC;AACzC;AAEO,SAASkB,oBAAoBA,CAACnB,IAAY,EAAEC,MAAc,EAAE;EACjE,OAAOc,eAAe,CAACf,IAAI,EAAEC,MAAM,EAAE,CAAC,CAAC;AACzC;AAEO,SAASmB,WAAWA,CACzBpB,IAAY,EACZC,MAAc,EACdW,UAAqB,EACrB;EACA,IAAI,CAACX,MAAM,EAAE,OAAO,KAAK;EAEzB,IAAIT,eAAe,CAACS,MAAM,CAAC,IAAIA,MAAM,CAACoB,MAAM,KAAKrB,IAAI,EAAE;IACrD,IAAIa,qBAAqB,CAACb,IAAI,CAAC,EAAE,OAAO,IAAI;EAC9C;EAEA,OAAOW,IAAI,CAACH,cAAc,EAAER,IAAI,EAAEC,MAAM,EAAEW,UAAU,CAAC;AACvD"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/parentheses.js b/node_modules/@babel/generator/lib/node/parentheses.js index 47b3c9172..4656a67ce 100644 --- a/node_modules/@babel/generator/lib/node/parentheses.js +++ b/node_modules/@babel/generator/lib/node/parentheses.js @@ -121,13 +121,7 @@ function NullableTypeAnnotation(node, parent) { } function FunctionTypeAnnotation(node, parent, printStack) { if (printStack.length < 3) return; - return ( - isUnionTypeAnnotation(parent) || - isIntersectionTypeAnnotation(parent) || - isArrayTypeAnnotation(parent) || - isTypeAnnotation(parent) && - isArrowFunctionExpression(printStack[printStack.length - 3]) - ); + return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]); } function UpdateExpression(node, parent) { return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); @@ -155,8 +149,7 @@ function Binary(node, parent) { const parentPos = PRECEDENCE[parentOp]; const nodeOp = node.operator; const nodePos = PRECEDENCE[nodeOp]; - if ( - parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) { + if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) { return true; } } @@ -185,11 +178,9 @@ function BinaryExpression(node, parent) { return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent)); } function SequenceExpression(node, parent) { - if ( - isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) { + if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) { return false; } - return true; } function YieldExpression(node, parent) { @@ -264,10 +255,8 @@ function Identifier(node, parent, printStack) { }); return isFirstInContext(printStack, isFollowedByBracket ? 1 | 8 | 16 | 32 : 32); } - return node.name === "async" && isForOfStatement(parent) && node === parent.left; } - function isFirstInContext(printStack, checkParam) { const expressionStatement = checkParam & 1; const arrowBody = checkParam & 2; diff --git a/node_modules/@babel/generator/lib/node/parentheses.js.map b/node_modules/@babel/generator/lib/node/parentheses.js.map index d2d180343..92cc7788e 100644 --- a/node_modules/@babel/generator/lib/node/parentheses.js.map +++ b/node_modules/@babel/generator/lib/node/parentheses.js.map @@ -1 +1 @@ -{"version":3,"names":["isArrayTypeAnnotation","isArrowFunctionExpression","isAssignmentExpression","isAwaitExpression","isBinary","isBinaryExpression","isUpdateExpression","isCallExpression","isClass","isClassExpression","isConditional","isConditionalExpression","isExportDeclaration","isExportDefaultDeclaration","isExpressionStatement","isFor","isForInStatement","isForOfStatement","isForStatement","isFunctionExpression","isIfStatement","isIndexedAccessType","isIntersectionTypeAnnotation","isLogicalExpression","isMemberExpression","isNewExpression","isNullableTypeAnnotation","isObjectPattern","isOptionalCallExpression","isOptionalMemberExpression","isReturnStatement","isSequenceExpression","isSwitchStatement","isTSArrayType","isTSAsExpression","isTSInstantiationExpression","isTSIntersectionType","isTSNonNullExpression","isTSOptionalType","isTSRestType","isTSTypeAssertion","isTSUnionType","isTaggedTemplateExpression","isThrowStatement","isTypeAnnotation","isUnaryLike","isUnionTypeAnnotation","isVariableDeclarator","isWhileStatement","isYieldExpression","isTSSatisfiesExpression","PRECEDENCE","in","instanceof","isTSTypeExpression","node","isClassExtendsClause","parent","superClass","hasPostfixPart","object","callee","tag","NullableTypeAnnotation","FunctionTypeAnnotation","printStack","length","UpdateExpression","ObjectExpression","isFirstInContext","DoExpression","async","Binary","operator","left","parentOp","parentPos","nodeOp","nodePos","right","UnionTypeAnnotation","OptionalIndexedAccessType","objectType","TSAsExpression","TSUnionType","TSInferType","TSInstantiationExpression","typeParameters","BinaryExpression","SequenceExpression","test","discriminant","expression","YieldExpression","ClassExpression","UnaryLike","FunctionExpression","ArrowFunctionExpression","ConditionalExpression","OptionalMemberExpression","AssignmentExpression","LogicalExpression","Identifier","extra","parenthesized","id","name","isFollowedByBracket","computed","optional","checkParam","expressionStatement","arrowBody","exportDefault","forHead","forInHead","forOfHead","i","declaration","body","init","expressions","prefix"],"sources":["../../src/node/parentheses.ts"],"sourcesContent":["import {\n isArrayTypeAnnotation,\n isArrowFunctionExpression,\n isAssignmentExpression,\n isAwaitExpression,\n isBinary,\n isBinaryExpression,\n isUpdateExpression,\n isCallExpression,\n isClass,\n isClassExpression,\n isConditional,\n isConditionalExpression,\n isExportDeclaration,\n isExportDefaultDeclaration,\n isExpressionStatement,\n isFor,\n isForInStatement,\n isForOfStatement,\n isForStatement,\n isFunctionExpression,\n isIfStatement,\n isIndexedAccessType,\n isIntersectionTypeAnnotation,\n isLogicalExpression,\n isMemberExpression,\n isNewExpression,\n isNullableTypeAnnotation,\n isObjectPattern,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isReturnStatement,\n isSequenceExpression,\n isSwitchStatement,\n isTSArrayType,\n isTSAsExpression,\n isTSInstantiationExpression,\n isTSIntersectionType,\n isTSNonNullExpression,\n isTSOptionalType,\n isTSRestType,\n isTSTypeAssertion,\n isTSUnionType,\n isTaggedTemplateExpression,\n isThrowStatement,\n isTypeAnnotation,\n isUnaryLike,\n isUnionTypeAnnotation,\n isVariableDeclarator,\n isWhileStatement,\n isYieldExpression,\n isTSSatisfiesExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nconst PRECEDENCE = {\n \"||\": 0,\n \"??\": 0,\n \"|>\": 0,\n \"&&\": 1,\n \"|\": 2,\n \"^\": 3,\n \"&\": 4,\n \"==\": 5,\n \"===\": 5,\n \"!=\": 5,\n \"!==\": 5,\n \"<\": 6,\n \">\": 6,\n \"<=\": 6,\n \">=\": 6,\n in: 6,\n instanceof: 6,\n \">>\": 7,\n \"<<\": 7,\n \">>>\": 7,\n \"+\": 8,\n \"-\": 8,\n \"*\": 9,\n \"/\": 9,\n \"%\": 9,\n \"**\": 10,\n};\n\nconst enum CheckParam {\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n forHead = 1 << 3,\n forInHead = 1 << 4,\n forOfHead = 1 << 5,\n}\n\nfunction isTSTypeExpression(node: t.Node) {\n return (\n isTSAsExpression(node) ||\n isTSSatisfiesExpression(node) ||\n isTSTypeAssertion(node)\n );\n}\n\nconst isClassExtendsClause = (\n node: t.Node,\n parent: t.Node,\n): parent is t.Class => isClass(parent, { superClass: node });\n\nconst hasPostfixPart = (node: t.Node, parent: t.Node) =>\n ((isMemberExpression(parent) || isOptionalMemberExpression(parent)) &&\n parent.object === node) ||\n ((isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent)) &&\n parent.callee === node) ||\n (isTaggedTemplateExpression(parent) && parent.tag === node) ||\n isTSNonNullExpression(parent);\n\nexport function NullableTypeAnnotation(\n node: t.NullableTypeAnnotation,\n parent: t.Node,\n): boolean {\n return isArrayTypeAnnotation(parent);\n}\n\nexport function FunctionTypeAnnotation(\n node: t.FunctionTypeAnnotation,\n parent: t.Node,\n printStack: Array,\n): boolean {\n if (printStack.length < 3) return;\n\n return (\n // (() => A) | (() => B)\n isUnionTypeAnnotation(parent) ||\n // (() => A) & (() => B)\n isIntersectionTypeAnnotation(parent) ||\n // (() => A)[]\n isArrayTypeAnnotation(parent) ||\n // (A: T): (T => T[]) => B => [A, B]\n (isTypeAnnotation(parent) &&\n // Check grandparent\n isArrowFunctionExpression(printStack[printStack.length - 3]))\n );\n}\n\nexport function UpdateExpression(\n node: t.UpdateExpression,\n parent: t.Node,\n): boolean {\n return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);\n}\n\nexport function ObjectExpression(\n node: t.ObjectExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.arrowBody,\n );\n}\n\nexport function DoExpression(\n node: t.DoExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n // `async do` can start an expression statement\n return (\n !node.async && isFirstInContext(printStack, CheckParam.expressionStatement)\n );\n}\n\nexport function Binary(node: t.BinaryExpression, parent: t.Node): boolean {\n if (\n node.operator === \"**\" &&\n isBinaryExpression(parent, { operator: \"**\" })\n ) {\n return parent.left === node;\n }\n\n if (isClassExtendsClause(node, parent)) {\n return true;\n }\n\n if (\n hasPostfixPart(node, parent) ||\n isUnaryLike(parent) ||\n isAwaitExpression(parent)\n ) {\n return true;\n }\n\n if (isBinary(parent)) {\n const parentOp = parent.operator;\n const parentPos = PRECEDENCE[parentOp];\n\n const nodeOp = node.operator;\n const nodePos = PRECEDENCE[nodeOp];\n\n if (\n // Logical expressions with the same precedence don't need parens.\n (parentPos === nodePos &&\n parent.right === node &&\n !isLogicalExpression(parent)) ||\n parentPos > nodePos\n ) {\n return true;\n }\n }\n}\n\nexport function UnionTypeAnnotation(\n node: t.UnionTypeAnnotation,\n parent: t.Node,\n): boolean {\n return (\n isArrayTypeAnnotation(parent) ||\n isNullableTypeAnnotation(parent) ||\n isIntersectionTypeAnnotation(parent) ||\n isUnionTypeAnnotation(parent)\n );\n}\n\nexport { UnionTypeAnnotation as IntersectionTypeAnnotation };\n\nexport function OptionalIndexedAccessType(\n node: t.OptionalIndexedAccessType,\n parent: t.Node,\n): boolean {\n return isIndexedAccessType(parent, { objectType: node });\n}\n\nexport function TSAsExpression() {\n return true;\n}\n\nexport {\n TSAsExpression as TSSatisfiesExpression,\n TSAsExpression as TSTypeAssertion,\n};\n\nexport function TSUnionType(node: t.TSUnionType, parent: t.Node): boolean {\n return (\n isTSArrayType(parent) ||\n isTSOptionalType(parent) ||\n isTSIntersectionType(parent) ||\n isTSUnionType(parent) ||\n isTSRestType(parent)\n );\n}\n\nexport { TSUnionType as TSIntersectionType };\n\nexport function TSInferType(node: t.TSInferType, parent: t.Node): boolean {\n return isTSArrayType(parent) || isTSOptionalType(parent);\n}\n\nexport function TSInstantiationExpression(\n node: t.TSInstantiationExpression,\n parent: t.Node,\n) {\n return (\n (isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent) ||\n isTSInstantiationExpression(parent)) &&\n !!parent.typeParameters\n );\n}\n\nexport function BinaryExpression(\n node: t.BinaryExpression,\n parent: t.Node,\n): boolean {\n // let i = (1 in []);\n // for ((1 in []);;);\n return (\n node.operator === \"in\" && (isVariableDeclarator(parent) || isFor(parent))\n );\n}\n\nexport function SequenceExpression(\n node: t.SequenceExpression,\n parent: t.Node,\n): boolean {\n if (\n // Although parentheses wouldn\"t hurt around sequence\n // expressions in the head of for loops, traditional style\n // dictates that e.g. i++, j++ should not be wrapped with\n // parentheses.\n isForStatement(parent) ||\n isThrowStatement(parent) ||\n isReturnStatement(parent) ||\n (isIfStatement(parent) && parent.test === node) ||\n (isWhileStatement(parent) && parent.test === node) ||\n (isForInStatement(parent) && parent.right === node) ||\n (isSwitchStatement(parent) && parent.discriminant === node) ||\n (isExpressionStatement(parent) && parent.expression === node)\n ) {\n return false;\n }\n\n // Otherwise err on the side of overparenthesization, adding\n // explicit exceptions above if this proves overzealous.\n return true;\n}\n\nexport function YieldExpression(\n node: t.YieldExpression,\n parent: t.Node,\n): boolean {\n return (\n isBinary(parent) ||\n isUnaryLike(parent) ||\n hasPostfixPart(node, parent) ||\n (isAwaitExpression(parent) && isYieldExpression(node)) ||\n (isConditionalExpression(parent) && node === parent.test) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport { YieldExpression as AwaitExpression };\n\nexport function ClassExpression(\n node: t.ClassExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function UnaryLike(\n node:\n | t.UnaryLike\n | t.ArrowFunctionExpression\n | t.ConditionalExpression\n | t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n return (\n hasPostfixPart(node, parent) ||\n isBinaryExpression(parent, { operator: \"**\", left: node }) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport function FunctionExpression(\n node: t.FunctionExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function ArrowFunctionExpression(\n node: t.ArrowFunctionExpression,\n parent: t.Node,\n): boolean {\n return isExportDeclaration(parent) || ConditionalExpression(node, parent);\n}\n\nexport function ConditionalExpression(\n node:\n | t.ConditionalExpression\n | t.ArrowFunctionExpression\n | t.AssignmentExpression,\n parent?: t.Node,\n): boolean {\n if (\n isUnaryLike(parent) ||\n isBinary(parent) ||\n isConditionalExpression(parent, { test: node }) ||\n isAwaitExpression(parent) ||\n isTSTypeExpression(parent)\n ) {\n return true;\n }\n\n return UnaryLike(node, parent);\n}\n\nexport function OptionalMemberExpression(\n node: t.OptionalMemberExpression,\n parent: t.Node,\n): boolean {\n return (\n isCallExpression(parent, { callee: node }) ||\n isMemberExpression(parent, { object: node })\n );\n}\n\nexport { OptionalMemberExpression as OptionalCallExpression };\n\nexport function AssignmentExpression(\n node: t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n if (isObjectPattern(node.left)) {\n return true;\n } else {\n return ConditionalExpression(node, parent);\n }\n}\n\nexport function LogicalExpression(\n node: t.LogicalExpression,\n parent: t.Node,\n): boolean {\n if (isTSTypeExpression(parent)) return true;\n switch (node.operator) {\n case \"||\":\n if (!isLogicalExpression(parent)) return false;\n return parent.operator === \"??\" || parent.operator === \"&&\";\n case \"&&\":\n return isLogicalExpression(parent, { operator: \"??\" });\n case \"??\":\n return isLogicalExpression(parent) && parent.operator !== \"??\";\n }\n}\n\nexport function Identifier(\n node: t.Identifier,\n parent: t.Node,\n printStack: Array,\n): boolean {\n // 13.15.2 AssignmentExpression RS: Evaluation\n // (fn) = function () {};\n if (\n node.extra?.parenthesized &&\n isAssignmentExpression(parent, { left: node }) &&\n (isFunctionExpression(parent.right) || isClassExpression(parent.right)) &&\n parent.right.id == null\n ) {\n return true;\n }\n // Non-strict code allows the identifier `let`, but it cannot occur as-is in\n // certain contexts to avoid ambiguity with contextual keyword `let`.\n if (node.name === \"let\") {\n // Some contexts only forbid `let [`, so check if the next token would\n // be the left bracket of a computed member expression.\n const isFollowedByBracket =\n isMemberExpression(parent, {\n object: node,\n computed: true,\n }) ||\n isOptionalMemberExpression(parent, {\n object: node,\n computed: true,\n optional: false,\n });\n return isFirstInContext(\n printStack,\n isFollowedByBracket\n ? CheckParam.expressionStatement |\n CheckParam.forHead |\n CheckParam.forInHead |\n CheckParam.forOfHead\n : CheckParam.forOfHead,\n );\n }\n\n // ECMAScript specifically forbids a for-of loop from starting with the\n // token sequence `for (async of`, because it would be ambiguous with\n // `for (async of => {};;)`, so we need to add extra parentheses.\n //\n // If the parent is a for-await-of loop (i.e. parent.await === true), the\n // parentheses aren't strictly needed, but we add them anyway because\n // some tools (including earlier Babel versions) can't parse\n // `for await (async of [])` without them.\n return (\n node.name === \"async\" && isForOfStatement(parent) && node === parent.left\n );\n}\n\n// Walk up the print stack to determine if our node can come first\n// in a particular context.\nfunction isFirstInContext(\n printStack: Array,\n checkParam: CheckParam,\n): boolean {\n const expressionStatement = checkParam & CheckParam.expressionStatement;\n const arrowBody = checkParam & CheckParam.arrowBody;\n const exportDefault = checkParam & CheckParam.exportDefault;\n const forHead = checkParam & CheckParam.forHead;\n const forInHead = checkParam & CheckParam.forInHead;\n const forOfHead = checkParam & CheckParam.forOfHead;\n\n let i = printStack.length - 1;\n if (i <= 0) return;\n let node = printStack[i];\n i--;\n let parent = printStack[i];\n while (i >= 0) {\n if (\n (expressionStatement &&\n isExpressionStatement(parent, { expression: node })) ||\n (exportDefault &&\n isExportDefaultDeclaration(parent, { declaration: node })) ||\n (arrowBody && isArrowFunctionExpression(parent, { body: node })) ||\n (forHead && isForStatement(parent, { init: node })) ||\n (forInHead && isForInStatement(parent, { left: node })) ||\n (forOfHead && isForOfStatement(parent, { left: node }))\n ) {\n return true;\n }\n\n if (\n i > 0 &&\n ((hasPostfixPart(node, parent) && !isNewExpression(parent)) ||\n (isSequenceExpression(parent) && parent.expressions[0] === node) ||\n (isUpdateExpression(parent) && !parent.prefix) ||\n isConditional(parent, { test: node }) ||\n isBinary(parent, { left: node }) ||\n isAssignmentExpression(parent, { left: node }))\n ) {\n node = parent;\n i--;\n parent = printStack[i];\n } else {\n return false;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAoDsB;EAnDpBA,qBAAqB;EACrBC,yBAAyB;EACzBC,sBAAsB;EACtBC,iBAAiB;EACjBC,QAAQ;EACRC,kBAAkB;EAClBC,kBAAkB;EAClBC,gBAAgB;EAChBC,OAAO;EACPC,iBAAiB;EACjBC,aAAa;EACbC,uBAAuB;EACvBC,mBAAmB;EACnBC,0BAA0B;EAC1BC,qBAAqB;EACrBC,KAAK;EACLC,gBAAgB;EAChBC,gBAAgB;EAChBC,cAAc;EACdC,oBAAoB;EACpBC,aAAa;EACbC,mBAAmB;EACnBC,4BAA4B;EAC5BC,mBAAmB;EACnBC,kBAAkB;EAClBC,eAAe;EACfC,wB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MAAM,CAAC,IACvD1B,oBAAoB,CAAC0B,MAAM,CAAC,IAAIA,MAAM,CAACgE,WAAW,CAAC,CAAC,CAAC,KAAKlE,IAAK,IAC/DjD,kBAAkB,CAACmD,MAAM,CAAC,IAAI,CAACA,MAAM,CAACiE,MAAO,IAC9ChH,aAAa,CAAC+C,MAAM,EAAE;MAAEiC,IAAI,EAAEnC;IAAK,CAAC,CAAC,IACrCnD,QAAQ,CAACqD,MAAM,EAAE;MAAEiB,IAAI,EAAEnB;IAAK,CAAC,CAAC,IAChCrD,sBAAsB,CAACuD,MAAM,EAAE;MAAEiB,IAAI,EAAEnB;IAAK,CAAC,CAAC,CAAC,EACjD;MACAA,IAAI,GAAGE,MAAM;MACb4D,CAAC,EAAE;MACH5D,MAAM,GAAGQ,UAAU,CAACoD,CAAC,CAAC;IACxB,CAAC,MAAM;MACL,OAAO,KAAK;IACd;EACF;EAEA,OAAO,KAAK;AACd"} \ No newline at end of file +{"version":3,"names":["_t","require","isArrayTypeAnnotation","isArrowFunctionExpression","isAssignmentExpression","isAwaitExpression","isBinary","isBinaryExpression","isUpdateExpression","isCallExpression","isClass","isClassExpression","isConditional","isConditionalExpression","isExportDeclaration","isExportDefaultDeclaration","isExpressionStatement","isFor","isForInStatement","isForOfStatement","isForStatement","isFunctionExpression","isIfStatement","isIndexedAccessType","isIntersectionTypeAnnotation","isLogicalExpression","isMemberExpression","isNewExpression","isNullableTypeAnnotation","isObjectPattern","isOptionalCallExpression","isOptionalMemberExpression","isReturnStatement","isSequenceExpression","isSwitchStatement","isTSArrayType","isTSAsExpression","isTSInstantiationExpression","isTSIntersectionType","isTSNonNullExpression","isTSOptionalType","isTSRestType","isTSTypeAssertion","isTSUnionType","isTaggedTemplateExpression","isThrowStatement","isTypeAnnotation","isUnaryLike","isUnionTypeAnnotation","isVariableDeclarator","isWhileStatement","isYieldExpression","isTSSatisfiesExpression","PRECEDENCE","in","instanceof","isTSTypeExpression","node","isClassExtendsClause","parent","superClass","hasPostfixPart","object","callee","tag","NullableTypeAnnotation","FunctionTypeAnnotation","printStack","length","UpdateExpression","ObjectExpression","isFirstInContext","DoExpression","async","Binary","operator","left","parentOp","parentPos","nodeOp","nodePos","right","UnionTypeAnnotation","OptionalIndexedAccessType","objectType","TSAsExpression","TSUnionType","TSInferType","TSInstantiationExpression","typeParameters","BinaryExpression","SequenceExpression","test","discriminant","expression","YieldExpression","ClassExpression","UnaryLike","FunctionExpression","ArrowFunctionExpression","ConditionalExpression","OptionalMemberExpression","AssignmentExpression","LogicalExpression","Identifier","_node$extra","extra","parenthesized","id","name","isFollowedByBracket","computed","optional","checkParam","expressionStatement","arrowBody","exportDefault","forHead","forInHead","forOfHead","i","declaration","body","init","expressions","prefix"],"sources":["../../src/node/parentheses.ts"],"sourcesContent":["import {\n isArrayTypeAnnotation,\n isArrowFunctionExpression,\n isAssignmentExpression,\n isAwaitExpression,\n isBinary,\n isBinaryExpression,\n isUpdateExpression,\n isCallExpression,\n isClass,\n isClassExpression,\n isConditional,\n isConditionalExpression,\n isExportDeclaration,\n isExportDefaultDeclaration,\n isExpressionStatement,\n isFor,\n isForInStatement,\n isForOfStatement,\n isForStatement,\n isFunctionExpression,\n isIfStatement,\n isIndexedAccessType,\n isIntersectionTypeAnnotation,\n isLogicalExpression,\n isMemberExpression,\n isNewExpression,\n isNullableTypeAnnotation,\n isObjectPattern,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isReturnStatement,\n isSequenceExpression,\n isSwitchStatement,\n isTSArrayType,\n isTSAsExpression,\n isTSInstantiationExpression,\n isTSIntersectionType,\n isTSNonNullExpression,\n isTSOptionalType,\n isTSRestType,\n isTSTypeAssertion,\n isTSUnionType,\n isTaggedTemplateExpression,\n isThrowStatement,\n isTypeAnnotation,\n isUnaryLike,\n isUnionTypeAnnotation,\n isVariableDeclarator,\n isWhileStatement,\n isYieldExpression,\n isTSSatisfiesExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nconst PRECEDENCE = {\n \"||\": 0,\n \"??\": 0,\n \"|>\": 0,\n \"&&\": 1,\n \"|\": 2,\n \"^\": 3,\n \"&\": 4,\n \"==\": 5,\n \"===\": 5,\n \"!=\": 5,\n \"!==\": 5,\n \"<\": 6,\n \">\": 6,\n \"<=\": 6,\n \">=\": 6,\n in: 6,\n instanceof: 6,\n \">>\": 7,\n \"<<\": 7,\n \">>>\": 7,\n \"+\": 8,\n \"-\": 8,\n \"*\": 9,\n \"/\": 9,\n \"%\": 9,\n \"**\": 10,\n};\n\nconst enum CheckParam {\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n forHead = 1 << 3,\n forInHead = 1 << 4,\n forOfHead = 1 << 5,\n}\n\nfunction isTSTypeExpression(node: t.Node) {\n return (\n isTSAsExpression(node) ||\n isTSSatisfiesExpression(node) ||\n isTSTypeAssertion(node)\n );\n}\n\nconst isClassExtendsClause = (\n node: t.Node,\n parent: t.Node,\n): parent is t.Class => isClass(parent, { superClass: node });\n\nconst hasPostfixPart = (node: t.Node, parent: t.Node) =>\n ((isMemberExpression(parent) || isOptionalMemberExpression(parent)) &&\n parent.object === node) ||\n ((isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent)) &&\n parent.callee === node) ||\n (isTaggedTemplateExpression(parent) && parent.tag === node) ||\n isTSNonNullExpression(parent);\n\nexport function NullableTypeAnnotation(\n node: t.NullableTypeAnnotation,\n parent: t.Node,\n): boolean {\n return isArrayTypeAnnotation(parent);\n}\n\nexport function FunctionTypeAnnotation(\n node: t.FunctionTypeAnnotation,\n parent: t.Node,\n printStack: Array,\n): boolean {\n if (printStack.length < 3) return;\n\n return (\n // (() => A) | (() => B)\n isUnionTypeAnnotation(parent) ||\n // (() => A) & (() => B)\n isIntersectionTypeAnnotation(parent) ||\n // (() => A)[]\n isArrayTypeAnnotation(parent) ||\n // (A: T): (T => T[]) => B => [A, B]\n (isTypeAnnotation(parent) &&\n // Check grandparent\n isArrowFunctionExpression(printStack[printStack.length - 3]))\n );\n}\n\nexport function UpdateExpression(\n node: t.UpdateExpression,\n parent: t.Node,\n): boolean {\n return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);\n}\n\nexport function ObjectExpression(\n node: t.ObjectExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.arrowBody,\n );\n}\n\nexport function DoExpression(\n node: t.DoExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n // `async do` can start an expression statement\n return (\n !node.async && isFirstInContext(printStack, CheckParam.expressionStatement)\n );\n}\n\nexport function Binary(node: t.BinaryExpression, parent: t.Node): boolean {\n if (\n node.operator === \"**\" &&\n isBinaryExpression(parent, { operator: \"**\" })\n ) {\n return parent.left === node;\n }\n\n if (isClassExtendsClause(node, parent)) {\n return true;\n }\n\n if (\n hasPostfixPart(node, parent) ||\n isUnaryLike(parent) ||\n isAwaitExpression(parent)\n ) {\n return true;\n }\n\n if (isBinary(parent)) {\n const parentOp = parent.operator;\n const parentPos = PRECEDENCE[parentOp];\n\n const nodeOp = node.operator;\n const nodePos = PRECEDENCE[nodeOp];\n\n if (\n // Logical expressions with the same precedence don't need parens.\n (parentPos === nodePos &&\n parent.right === node &&\n !isLogicalExpression(parent)) ||\n parentPos > nodePos\n ) {\n return true;\n }\n }\n}\n\nexport function UnionTypeAnnotation(\n node: t.UnionTypeAnnotation,\n parent: t.Node,\n): boolean {\n return (\n isArrayTypeAnnotation(parent) ||\n isNullableTypeAnnotation(parent) ||\n isIntersectionTypeAnnotation(parent) ||\n isUnionTypeAnnotation(parent)\n );\n}\n\nexport { UnionTypeAnnotation as IntersectionTypeAnnotation };\n\nexport function OptionalIndexedAccessType(\n node: t.OptionalIndexedAccessType,\n parent: t.Node,\n): boolean {\n return isIndexedAccessType(parent, { objectType: node });\n}\n\nexport function TSAsExpression() {\n return true;\n}\n\nexport {\n TSAsExpression as TSSatisfiesExpression,\n TSAsExpression as TSTypeAssertion,\n};\n\nexport function TSUnionType(node: t.TSUnionType, parent: t.Node): boolean {\n return (\n isTSArrayType(parent) ||\n isTSOptionalType(parent) ||\n isTSIntersectionType(parent) ||\n isTSUnionType(parent) ||\n isTSRestType(parent)\n );\n}\n\nexport { TSUnionType as TSIntersectionType };\n\nexport function TSInferType(node: t.TSInferType, parent: t.Node): boolean {\n return isTSArrayType(parent) || isTSOptionalType(parent);\n}\n\nexport function TSInstantiationExpression(\n node: t.TSInstantiationExpression,\n parent: t.Node,\n) {\n return (\n (isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent) ||\n isTSInstantiationExpression(parent)) &&\n !!parent.typeParameters\n );\n}\n\nexport function BinaryExpression(\n node: t.BinaryExpression,\n parent: t.Node,\n): boolean {\n // let i = (1 in []);\n // for ((1 in []);;);\n return (\n node.operator === \"in\" && (isVariableDeclarator(parent) || isFor(parent))\n );\n}\n\nexport function SequenceExpression(\n node: t.SequenceExpression,\n parent: t.Node,\n): boolean {\n if (\n // Although parentheses wouldn't hurt around sequence\n // expressions in the head of for loops, traditional style\n // dictates that e.g. i++, j++ should not be wrapped with\n // parentheses.\n isForStatement(parent) ||\n isThrowStatement(parent) ||\n isReturnStatement(parent) ||\n (isIfStatement(parent) && parent.test === node) ||\n (isWhileStatement(parent) && parent.test === node) ||\n (isForInStatement(parent) && parent.right === node) ||\n (isSwitchStatement(parent) && parent.discriminant === node) ||\n (isExpressionStatement(parent) && parent.expression === node)\n ) {\n return false;\n }\n\n // Otherwise err on the side of overparenthesization, adding\n // explicit exceptions above if this proves overzealous.\n return true;\n}\n\nexport function YieldExpression(\n node: t.YieldExpression,\n parent: t.Node,\n): boolean {\n return (\n isBinary(parent) ||\n isUnaryLike(parent) ||\n hasPostfixPart(node, parent) ||\n (isAwaitExpression(parent) && isYieldExpression(node)) ||\n (isConditionalExpression(parent) && node === parent.test) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport { YieldExpression as AwaitExpression };\n\nexport function ClassExpression(\n node: t.ClassExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function UnaryLike(\n node:\n | t.UnaryLike\n | t.ArrowFunctionExpression\n | t.ConditionalExpression\n | t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n return (\n hasPostfixPart(node, parent) ||\n isBinaryExpression(parent, { operator: \"**\", left: node }) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport function FunctionExpression(\n node: t.FunctionExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function ArrowFunctionExpression(\n node: t.ArrowFunctionExpression,\n parent: t.Node,\n): boolean {\n return isExportDeclaration(parent) || ConditionalExpression(node, parent);\n}\n\nexport function ConditionalExpression(\n node:\n | t.ConditionalExpression\n | t.ArrowFunctionExpression\n | t.AssignmentExpression,\n parent?: t.Node,\n): boolean {\n if (\n isUnaryLike(parent) ||\n isBinary(parent) ||\n isConditionalExpression(parent, { test: node }) ||\n isAwaitExpression(parent) ||\n isTSTypeExpression(parent)\n ) {\n return true;\n }\n\n return UnaryLike(node, parent);\n}\n\nexport function OptionalMemberExpression(\n node: t.OptionalMemberExpression,\n parent: t.Node,\n): boolean {\n return (\n isCallExpression(parent, { callee: node }) ||\n isMemberExpression(parent, { object: node })\n );\n}\n\nexport { OptionalMemberExpression as OptionalCallExpression };\n\nexport function AssignmentExpression(\n node: t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n if (isObjectPattern(node.left)) {\n return true;\n } else {\n return ConditionalExpression(node, parent);\n }\n}\n\nexport function LogicalExpression(\n node: t.LogicalExpression,\n parent: t.Node,\n): boolean {\n if (isTSTypeExpression(parent)) return true;\n switch (node.operator) {\n case \"||\":\n if (!isLogicalExpression(parent)) return false;\n return parent.operator === \"??\" || parent.operator === \"&&\";\n case \"&&\":\n return isLogicalExpression(parent, { operator: \"??\" });\n case \"??\":\n return isLogicalExpression(parent) && parent.operator !== \"??\";\n }\n}\n\nexport function Identifier(\n node: t.Identifier,\n parent: t.Node,\n printStack: Array,\n): boolean {\n // 13.15.2 AssignmentExpression RS: Evaluation\n // (fn) = function () {};\n if (\n node.extra?.parenthesized &&\n isAssignmentExpression(parent, { left: node }) &&\n (isFunctionExpression(parent.right) || isClassExpression(parent.right)) &&\n parent.right.id == null\n ) {\n return true;\n }\n // Non-strict code allows the identifier `let`, but it cannot occur as-is in\n // certain contexts to avoid ambiguity with contextual keyword `let`.\n if (node.name === \"let\") {\n // Some contexts only forbid `let [`, so check if the next token would\n // be the left bracket of a computed member expression.\n const isFollowedByBracket =\n isMemberExpression(parent, {\n object: node,\n computed: true,\n }) ||\n isOptionalMemberExpression(parent, {\n object: node,\n computed: true,\n optional: false,\n });\n return isFirstInContext(\n printStack,\n isFollowedByBracket\n ? CheckParam.expressionStatement |\n CheckParam.forHead |\n CheckParam.forInHead |\n CheckParam.forOfHead\n : CheckParam.forOfHead,\n );\n }\n\n // ECMAScript specifically forbids a for-of loop from starting with the\n // token sequence `for (async of`, because it would be ambiguous with\n // `for (async of => {};;)`, so we need to add extra parentheses.\n //\n // If the parent is a for-await-of loop (i.e. parent.await === true), the\n // parentheses aren't strictly needed, but we add them anyway because\n // some tools (including earlier Babel versions) can't parse\n // `for await (async of [])` without them.\n return (\n node.name === \"async\" && isForOfStatement(parent) && node === parent.left\n );\n}\n\n// Walk up the print stack to determine if our node can come first\n// in a particular context.\nfunction isFirstInContext(\n printStack: Array,\n checkParam: CheckParam,\n): boolean {\n const expressionStatement = checkParam & CheckParam.expressionStatement;\n const arrowBody = checkParam & CheckParam.arrowBody;\n const exportDefault = checkParam & CheckParam.exportDefault;\n const forHead = checkParam & CheckParam.forHead;\n const forInHead = checkParam & CheckParam.forInHead;\n const forOfHead = checkParam & CheckParam.forOfHead;\n\n let i = printStack.length - 1;\n if (i <= 0) return;\n let node = printStack[i];\n i--;\n let parent = printStack[i];\n while (i >= 0) {\n if (\n (expressionStatement &&\n isExpressionStatement(parent, { expression: node })) ||\n (exportDefault &&\n isExportDefaultDeclaration(parent, { declaration: node })) ||\n (arrowBody && isArrowFunctionExpression(parent, { body: node })) ||\n (forHead && isForStatement(parent, { init: node })) ||\n (forInHead && isForInStatement(parent, { left: node })) ||\n (forOfHead && isForOfStatement(parent, { left: node }))\n ) {\n return true;\n }\n\n if (\n i > 0 &&\n ((hasPostfixPart(node, parent) && !isNewExpression(parent)) ||\n (isSequenceExpression(parent) && parent.expressions[0] === node) ||\n (isUpdateExpression(parent) && !parent.prefix) ||\n isConditional(parent, { test: node }) ||\n isBinary(parent, { left: node }) ||\n isAssignmentExpression(parent, { left: node }))\n ) {\n node = parent;\n i--;\n parent = printStack[i];\n } else {\n return false;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAoDsB;EAnDpBC,qBAAqB;EACrBC,yBAAyB;EACzBC,sBAAsB;EACtBC,iBAAiB;EACjBC,QAAQ;EACRC,kBAAkB;EAClBC,kBAAkB;EAClBC,gBAAgB;EAChBC,OAAO;EACPC,iBAAiB;EACjBC,aAAa;EACbC,uBAAuB;EACvBC,mBAAmB;EACnBC,0BAA0B;EAC1BC,qBAAqB;EACrBC,KAAK;EACLC,gBAAgB;EAChBC,gBAAgB;EAChBC,cAAc;EACdC,oBAAoB;EACpBC,aAAa;EACbC,mBAAmB;EACnBC,4BAA4B;EAC5BC,mBAAmB;EACnBC,kBAAkB;EAClBC,eAAe;EACfC,wBAAwB;EACxBC,eAAe;EACfC,wBAAwB;EACxBC,0BAA0B;EAC1BC,iBAAiB;EACjBC,oBAAoB;EACpBC,iBAAiB;EACjBC,aAAa;EACbC,gBAAgB;EAChBC,2BAA2B;EAC3BC,oBAAoB;EACpBC,qBAAqB;EACrBC,gBAAgB;EAChBC,YAAY;EACZC,iBAAiB;EACj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AAM,CAAC,IAAI,CAACA,MAAM,CAACkE,MAAO,IAC9CjH,aAAa,CAAC+C,MAAM,EAAE;MAAEiC,IAAI,EAAEnC;IAAK,CAAC,CAAC,IACrCnD,QAAQ,CAACqD,MAAM,EAAE;MAAEiB,IAAI,EAAEnB;IAAK,CAAC,CAAC,IAChCrD,sBAAsB,CAACuD,MAAM,EAAE;MAAEiB,IAAI,EAAEnB;IAAK,CAAC,CAAC,CAAC,EACjD;MACAA,IAAI,GAAGE,MAAM;MACb6D,CAAC,EAAE;MACH7D,MAAM,GAAGQ,UAAU,CAACqD,CAAC,CAAC;IACxB,CAAC,MAAM;MACL,OAAO,KAAK;IACd;EACF;EAEA,OAAO,KAAK;AACd"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/whitespace.js b/node_modules/@babel/generator/lib/node/whitespace.js index e5196fb8e..17daf359e 100644 --- a/node_modules/@babel/generator/lib/node/whitespace.js +++ b/node_modules/@babel/generator/lib/node/whitespace.js @@ -35,12 +35,10 @@ function crawlInternal(node, state) { } else if (isFunction(node)) { state.hasFunction = true; } else if (isIdentifier(node)) { - state.hasHelper = - state.hasHelper || node.callee && isHelper(node.callee); + state.hasHelper = state.hasHelper || node.callee && isHelper(node.callee); } return state; } - function crawl(node) { return crawlInternal(node, { hasCall: false, @@ -48,7 +46,6 @@ function crawl(node) { hasHelper: false }); } - function isHelper(node) { if (!node) return false; if (isMemberExpression(node)) { @@ -66,32 +63,26 @@ function isHelper(node) { function isType(node) { return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node); } - const nodes = { - AssignmentExpression(node) { const state = crawl(node.right); if (state.hasCall && state.hasHelper || state.hasFunction) { return state.hasFunction ? 1 | 2 : 2; } }, - SwitchCase(node, parent) { return (!!node.consequent.length || parent.cases[0] === node ? 1 : 0) | (!node.consequent.length && parent.cases[parent.cases.length - 1] === node ? 2 : 0); }, - LogicalExpression(node) { if (isFunction(node.left) || isFunction(node.right)) { return 2; } }, - Literal(node) { if (isStringLiteral(node) && node.value === "use strict") { return 2; } }, - CallExpression(node) { if (isFunction(node.callee) || isHelper(node)) { return 1 | 2; @@ -102,7 +93,6 @@ const nodes = { return 1 | 2; } }, - VariableDeclaration(node) { for (let i = 0; i < node.declarations.length; i++) { const declar = node.declarations[i]; @@ -116,16 +106,13 @@ const nodes = { } } }, - IfStatement(node) { if (isBlockStatement(node.consequent)) { return 1 | 2; } } }; - exports.nodes = nodes; - nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { if (parent.properties[0] === node) { return 1; @@ -149,7 +136,6 @@ nodes.ObjectTypeInternalSlot = function (node, parent) { return 1; } }; - [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) { [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { const ret = amounts ? 1 | 2 : 0; diff --git a/node_modules/@babel/generator/lib/node/whitespace.js.map b/node_modules/@babel/generator/lib/node/whitespace.js.map index e1232cfa6..249c40beb 100644 --- a/node_modules/@babel/generator/lib/node/whitespace.js.map +++ b/node_modules/@babel/generator/lib/node/whitespace.js.map @@ -1 +1 @@ -{"version":3,"names":["FLIPPED_ALIAS_KEYS","isArrayExpression","isAssignmentExpression","isBinary","isBlockStatement","isCallExpression","isFunction","isIdentifier","isLiteral","isMemberExpression","isObjectExpression","isOptionalCallExpression","isOptionalMemberExpression","isStringLiteral","crawlInternal","node","state","object","computed","property","left","right","hasCall","callee","hasFunction","hasHelper","isHelper","crawl","name","charCodeAt","isType","nodes","AssignmentExpression","SwitchCase","parent","consequent","length","cases","LogicalExpression","Literal","value","CallExpression","OptionalCallExpression","VariableDeclaration","i","declarations","declar","enabled","id","init","IfStatement","ObjectProperty","ObjectTypeProperty","ObjectMethod","properties","ObjectTypeCallProperty","callProperties","ObjectTypeIndexer","indexers","ObjectTypeInternalSlot","internalSlots","forEach","type","amounts","concat","ret"],"sources":["../../src/node/whitespace.ts"],"sourcesContent":["import {\n FLIPPED_ALIAS_KEYS,\n isArrayExpression,\n isAssignmentExpression,\n isBinary,\n isBlockStatement,\n isCallExpression,\n isFunction,\n isIdentifier,\n isLiteral,\n isMemberExpression,\n isObjectExpression,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isStringLiteral,\n} from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nimport type { NodeHandlers } from \"./index\";\n\nimport type * as t from \"@babel/types\";\n\nconst enum WhitespaceFlag {\n before = 1 << 0,\n after = 1 << 1,\n}\n\nexport type { WhitespaceFlag };\n\nfunction crawlInternal(\n node: t.Node,\n state: { hasCall: boolean; hasFunction: boolean; hasHelper: boolean },\n) {\n if (!node) return state;\n\n if (isMemberExpression(node) || isOptionalMemberExpression(node)) {\n crawlInternal(node.object, state);\n if (node.computed) crawlInternal(node.property, state);\n } else if (isBinary(node) || isAssignmentExpression(node)) {\n crawlInternal(node.left, state);\n crawlInternal(node.right, state);\n } else if (isCallExpression(node) || isOptionalCallExpression(node)) {\n state.hasCall = true;\n crawlInternal(node.callee, state);\n } else if (isFunction(node)) {\n state.hasFunction = true;\n } else if (isIdentifier(node)) {\n state.hasHelper =\n // @ts-expect-error todo(flow->ts): node.callee is not really expected here…\n state.hasHelper || (node.callee && isHelper(node.callee));\n }\n\n return state;\n}\n\n/**\n * Crawl a node to test if it contains a CallExpression, a Function, or a Helper.\n *\n * @example\n * crawl(node)\n * // { hasCall: false, hasFunction: true, hasHelper: false }\n */\n\nfunction crawl(node: t.Node) {\n return crawlInternal(node, {\n hasCall: false,\n hasFunction: false,\n hasHelper: false,\n });\n}\n\n/**\n * Test if a node is or has a helper.\n */\n\nfunction isHelper(node: t.Node): boolean {\n if (!node) return false;\n\n if (isMemberExpression(node)) {\n return isHelper(node.object) || isHelper(node.property);\n } else if (isIdentifier(node)) {\n return (\n node.name === \"require\" ||\n node.name.charCodeAt(0) === charCodes.underscore\n );\n } else if (isCallExpression(node)) {\n return isHelper(node.callee);\n } else if (isBinary(node) || isAssignmentExpression(node)) {\n return (\n (isIdentifier(node.left) && isHelper(node.left)) || isHelper(node.right)\n );\n } else {\n return false;\n }\n}\n\nfunction isType(node: t.Node) {\n return (\n isLiteral(node) ||\n isObjectExpression(node) ||\n isArrayExpression(node) ||\n isIdentifier(node) ||\n isMemberExpression(node)\n );\n}\n\n/**\n * Tests for node types that need whitespace.\n */\n\nexport const nodes: NodeHandlers = {\n /**\n * Test if AssignmentExpression needs whitespace.\n */\n\n AssignmentExpression(node: t.AssignmentExpression): WhitespaceFlag {\n const state = crawl(node.right);\n if ((state.hasCall && state.hasHelper) || state.hasFunction) {\n return state.hasFunction\n ? WhitespaceFlag.before | WhitespaceFlag.after\n : WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if SwitchCase needs whitespace.\n */\n\n SwitchCase(node: t.SwitchCase, parent: t.SwitchStatement): WhitespaceFlag {\n return (\n (!!node.consequent.length || parent.cases[0] === node\n ? WhitespaceFlag.before\n : 0) |\n (!node.consequent.length && parent.cases[parent.cases.length - 1] === node\n ? WhitespaceFlag.after\n : 0)\n );\n },\n\n /**\n * Test if LogicalExpression needs whitespace.\n */\n\n LogicalExpression(node: t.LogicalExpression): WhitespaceFlag {\n if (isFunction(node.left) || isFunction(node.right)) {\n return WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if Literal needs whitespace.\n */\n\n Literal(node: t.Literal): WhitespaceFlag {\n if (isStringLiteral(node) && node.value === \"use strict\") {\n return WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if CallExpressionish needs whitespace.\n */\n\n CallExpression(node: t.CallExpression): WhitespaceFlag {\n if (isFunction(node.callee) || isHelper(node)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n\n OptionalCallExpression(node: t.OptionalCallExpression): WhitespaceFlag {\n if (isFunction(node.callee)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if VariableDeclaration needs whitespace.\n */\n\n VariableDeclaration(node: t.VariableDeclaration): WhitespaceFlag {\n for (let i = 0; i < node.declarations.length; i++) {\n const declar = node.declarations[i];\n\n let enabled = isHelper(declar.id) && !isType(declar.init);\n if (!enabled && declar.init) {\n const state = crawl(declar.init);\n enabled = (isHelper(declar.init) && state.hasCall) || state.hasFunction;\n }\n\n if (enabled) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n }\n },\n\n /**\n * Test if IfStatement needs whitespace.\n */\n\n IfStatement(node: t.IfStatement): WhitespaceFlag {\n if (isBlockStatement(node.consequent)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n};\n\n/**\n * Test if Property needs whitespace.\n */\n\nnodes.ObjectProperty =\n nodes.ObjectTypeProperty =\n nodes.ObjectMethod =\n function (\n node: t.ObjectProperty | t.ObjectTypeProperty | t.ObjectMethod,\n parent: t.ObjectExpression,\n ): WhitespaceFlag {\n if (parent.properties[0] === node) {\n return WhitespaceFlag.before;\n }\n };\n\nnodes.ObjectTypeCallProperty = function (\n node: t.ObjectTypeCallProperty,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (parent.callProperties[0] === node && !parent.properties?.length) {\n return WhitespaceFlag.before;\n }\n};\n\nnodes.ObjectTypeIndexer = function (\n node: t.ObjectTypeIndexer,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (\n parent.indexers[0] === node &&\n !parent.properties?.length &&\n !parent.callProperties?.length\n ) {\n return WhitespaceFlag.before;\n }\n};\n\nnodes.ObjectTypeInternalSlot = function (\n node: t.ObjectTypeInternalSlot,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (\n parent.internalSlots[0] === node &&\n !parent.properties?.length &&\n !parent.callProperties?.length &&\n !parent.indexers?.length\n ) {\n return WhitespaceFlag.before;\n }\n};\n\n/**\n * Add whitespace tests for nodes and their aliases.\n */\n\n(\n [\n [\"Function\", true],\n [\"Class\", true],\n [\"Loop\", true],\n [\"LabeledStatement\", true],\n [\"SwitchStatement\", true],\n [\"TryStatement\", true],\n ] as const\n).forEach(function ([type, amounts]) {\n [type as string]\n .concat(FLIPPED_ALIAS_KEYS[type] || [])\n .forEach(function (type) {\n const ret = amounts ? WhitespaceFlag.before | WhitespaceFlag.after : 0;\n nodes[type] = () => ret;\n });\n});\n"],"mappings":";;;;;;AAAA;AAesB;EAdpBA,kBAAkB;EAClBC,iBAAiB;EACjBC,sBAAsB;EACtBC,QAAQ;EACRC,gBAAgB;EAChBC,gBAAgB;EAChBC,UAAU;EACVC,YAAY;EACZC,SAAS;EACTC,kBAAkB;EAClBC,kBAAkB;EAClBC,wBAAwB;EACxBC,0BAA0B;EAC1BC;AAAe;AAejB,SAASC,aAAa,CACpBC,IAAY,EACZC,KAAqE,EACrE;EACA,IAAI,CAACD,IAAI,EAAE,OAAOC,KAAK;EAEvB,IAAIP,kBAAkB,CAACM,IAAI,CAAC,IAAIH,0BAA0B,CAACG,IAAI,CAAC,EAAE;IAChED,aAAa,CAACC,IAAI,CAACE,MAAM,EAAED,KAAK,CAAC;IACjC,IAAID,IAAI,CAACG,QAAQ,EAAEJ,aAAa,CAACC,IAAI,CAACI,QAAQ,EAAEH,KAAK,CAAC;EACxD,CAAC,MAAM,IAAIb,QAAQ,CAACY,IAAI,CAAC,IAAIb,sBAAsB,CAACa,IAAI,CAAC,EAAE;IACzDD,aAAa,CAACC,IAAI,CAACK,IAAI,EAAEJ,KAAK,CAAC;IAC/BF,aAAa,CAACC,IAAI,CAACM,KAAK,EAAEL,KAAK,CAAC;EAClC,CAAC,MAAM,IAAIX,gBAAgB,CAACU,IAAI,CAAC,IAAIJ,wBAAwB,CAACI,IAAI,CAAC,EAAE;IACnEC,KAAK,CAACM,OAAO,GAAG,IAAI;IACpBR,aAAa,CAACC,IAAI,CAACQ,MAAM,EAAEP,KAAK,CAAC;EACnC,CAAC,MAAM,IAAIV,UAAU,CAACS,IAAI,CAAC,EAAE;IAC3BC,KAAK,CAACQ,WAAW,GAAG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AAMG,GAAG,GAAGF,OAAO,GAAG,KAA4C,GAAG,CAAC;IACtEhC,KAAK,CAAC+B,IAAI,CAAC,GAAG,MAAMG,GAAG;EACzB,CAAC,CAAC;AACN,CAAC,CAAC"} \ No newline at end of file +{"version":3,"names":["_t","require","FLIPPED_ALIAS_KEYS","isArrayExpression","isAssignmentExpression","isBinary","isBlockStatement","isCallExpression","isFunction","isIdentifier","isLiteral","isMemberExpression","isObjectExpression","isOptionalCallExpression","isOptionalMemberExpression","isStringLiteral","crawlInternal","node","state","object","computed","property","left","right","hasCall","callee","hasFunction","hasHelper","isHelper","crawl","name","charCodeAt","isType","nodes","AssignmentExpression","SwitchCase","parent","consequent","length","cases","LogicalExpression","Literal","value","CallExpression","OptionalCallExpression","VariableDeclaration","i","declarations","declar","enabled","id","init","IfStatement","exports","ObjectProperty","ObjectTypeProperty","ObjectMethod","properties","ObjectTypeCallProperty","_parent$properties","callProperties","ObjectTypeIndexer","_parent$properties2","_parent$callPropertie","indexers","ObjectTypeInternalSlot","_parent$properties3","_parent$callPropertie2","_parent$indexers","internalSlots","forEach","type","amounts","concat","ret"],"sources":["../../src/node/whitespace.ts"],"sourcesContent":["import {\n FLIPPED_ALIAS_KEYS,\n isArrayExpression,\n isAssignmentExpression,\n isBinary,\n isBlockStatement,\n isCallExpression,\n isFunction,\n isIdentifier,\n isLiteral,\n isMemberExpression,\n isObjectExpression,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isStringLiteral,\n} from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nimport type { NodeHandlers } from \"./index\";\n\nimport type * as t from \"@babel/types\";\n\nconst enum WhitespaceFlag {\n before = 1 << 0,\n after = 1 << 1,\n}\n\nexport type { WhitespaceFlag };\n\nfunction crawlInternal(\n node: t.Node,\n state: { hasCall: boolean; hasFunction: boolean; hasHelper: boolean },\n) {\n if (!node) return state;\n\n if (isMemberExpression(node) || isOptionalMemberExpression(node)) {\n crawlInternal(node.object, state);\n if (node.computed) crawlInternal(node.property, state);\n } else if (isBinary(node) || isAssignmentExpression(node)) {\n crawlInternal(node.left, state);\n crawlInternal(node.right, state);\n } else if (isCallExpression(node) || isOptionalCallExpression(node)) {\n state.hasCall = true;\n crawlInternal(node.callee, state);\n } else if (isFunction(node)) {\n state.hasFunction = true;\n } else if (isIdentifier(node)) {\n state.hasHelper =\n // @ts-expect-error todo(flow->ts): node.callee is not really expected here…\n state.hasHelper || (node.callee && isHelper(node.callee));\n }\n\n return state;\n}\n\n/**\n * Crawl a node to test if it contains a CallExpression, a Function, or a Helper.\n *\n * @example\n * crawl(node)\n * // { hasCall: false, hasFunction: true, hasHelper: false }\n */\n\nfunction crawl(node: t.Node) {\n return crawlInternal(node, {\n hasCall: false,\n hasFunction: false,\n hasHelper: false,\n });\n}\n\n/**\n * Test if a node is or has a helper.\n */\n\nfunction isHelper(node: t.Node): boolean {\n if (!node) return false;\n\n if (isMemberExpression(node)) {\n return isHelper(node.object) || isHelper(node.property);\n } else if (isIdentifier(node)) {\n return (\n node.name === \"require\" ||\n node.name.charCodeAt(0) === charCodes.underscore\n );\n } else if (isCallExpression(node)) {\n return isHelper(node.callee);\n } else if (isBinary(node) || isAssignmentExpression(node)) {\n return (\n (isIdentifier(node.left) && isHelper(node.left)) || isHelper(node.right)\n );\n } else {\n return false;\n }\n}\n\nfunction isType(node: t.Node) {\n return (\n isLiteral(node) ||\n isObjectExpression(node) ||\n isArrayExpression(node) ||\n isIdentifier(node) ||\n isMemberExpression(node)\n );\n}\n\n/**\n * Tests for node types that need whitespace.\n */\n\nexport const nodes: NodeHandlers = {\n /**\n * Test if AssignmentExpression needs whitespace.\n */\n\n AssignmentExpression(node: t.AssignmentExpression): WhitespaceFlag {\n const state = crawl(node.right);\n if ((state.hasCall && state.hasHelper) || state.hasFunction) {\n return state.hasFunction\n ? WhitespaceFlag.before | WhitespaceFlag.after\n : WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if SwitchCase needs whitespace.\n */\n\n SwitchCase(node: t.SwitchCase, parent: t.SwitchStatement): WhitespaceFlag {\n return (\n (!!node.consequent.length || parent.cases[0] === node\n ? WhitespaceFlag.before\n : 0) |\n (!node.consequent.length && parent.cases[parent.cases.length - 1] === node\n ? WhitespaceFlag.after\n : 0)\n );\n },\n\n /**\n * Test if LogicalExpression needs whitespace.\n */\n\n LogicalExpression(node: t.LogicalExpression): WhitespaceFlag {\n if (isFunction(node.left) || isFunction(node.right)) {\n return WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if Literal needs whitespace.\n */\n\n Literal(node: t.Literal): WhitespaceFlag {\n if (isStringLiteral(node) && node.value === \"use strict\") {\n return WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if CallExpressionish needs whitespace.\n */\n\n CallExpression(node: t.CallExpression): WhitespaceFlag {\n if (isFunction(node.callee) || isHelper(node)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n\n OptionalCallExpression(node: t.OptionalCallExpression): WhitespaceFlag {\n if (isFunction(node.callee)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if VariableDeclaration needs whitespace.\n */\n\n VariableDeclaration(node: t.VariableDeclaration): WhitespaceFlag {\n for (let i = 0; i < node.declarations.length; i++) {\n const declar = node.declarations[i];\n\n let enabled = isHelper(declar.id) && !isType(declar.init);\n if (!enabled && declar.init) {\n const state = crawl(declar.init);\n enabled = (isHelper(declar.init) && state.hasCall) || state.hasFunction;\n }\n\n if (enabled) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n }\n },\n\n /**\n * Test if IfStatement needs whitespace.\n */\n\n IfStatement(node: t.IfStatement): WhitespaceFlag {\n if (isBlockStatement(node.consequent)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n};\n\n/**\n * Test if Property needs whitespace.\n */\n\nnodes.ObjectProperty =\n nodes.ObjectTypeProperty =\n nodes.ObjectMethod =\n function (\n node: t.ObjectProperty | t.ObjectTypeProperty | t.ObjectMethod,\n parent: t.ObjectExpression,\n ): WhitespaceFlag {\n if (parent.properties[0] === node) {\n return WhitespaceFlag.before;\n }\n };\n\nnodes.ObjectTypeCallProperty = function (\n node: t.ObjectTypeCallProperty,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (parent.callProperties[0] === node && !parent.properties?.length) {\n return WhitespaceFlag.before;\n }\n};\n\nnodes.ObjectTypeIndexer = function (\n node: t.ObjectTypeIndexer,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (\n parent.indexers[0] === node &&\n !parent.properties?.length &&\n !parent.callProperties?.length\n ) {\n return WhitespaceFlag.before;\n }\n};\n\nnodes.ObjectTypeInternalSlot = function (\n node: t.ObjectTypeInternalSlot,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (\n parent.internalSlots[0] === node &&\n !parent.properties?.length &&\n !parent.callProperties?.length &&\n !parent.indexers?.length\n ) {\n return WhitespaceFlag.before;\n }\n};\n\n/**\n * Add whitespace tests for nodes and their aliases.\n */\n\n(\n [\n [\"Function\", true],\n [\"Class\", true],\n [\"Loop\", true],\n [\"LabeledStatement\", true],\n [\"SwitchStatement\", true],\n [\"TryStatement\", true],\n ] as const\n).forEach(function ([type, amounts]) {\n [type as string]\n .concat(FLIPPED_ALIAS_KEYS[type] || [])\n .forEach(function (type) {\n const ret = amounts ? WhitespaceFlag.before | WhitespaceFlag.after : 0;\n nodes[type] = () => ret;\n });\n});\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAesB;EAdpBC,kBAAkB;EAClBC,iBAAiB;EACjBC,sBAAsB;EACtBC,QAAQ;EACRC,gBAAgB;EAChBC,gBAAgB;EAChBC,UAAU;EACVC,YAAY;EACZC,SAAS;EACTC,kBAAkB;EAClBC,kBAAkB;EAClBC,wBAAwB;EACxBC,0BAA0B;EAC1BC;AAAe,IAAAf,EAAA;AAejB,SAASgB,aAAaA,CACpBC,IAAY,EACZC,KAAqE,EACrE;EACA,IAAI,CAAC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AC1B,GAAAyB,qBAAA,GAAC3B,MAAM,CAACwB,cAAc,aAArBG,qBAAA,CAAuBzB,MAAM,GAC9B;IACA;EACF;AACF,CAAC;AAEDL,KAAK,CAACgC,sBAAsB,GAAG,UAC7BhD,IAA8B,EAC9BmB,MAA8B,EACd;EAAA,IAAA8B,mBAAA,EAAAC,sBAAA,EAAAC,gBAAA;EAChB,IACEhC,MAAM,CAACiC,aAAa,CAAC,CAAC,CAAC,KAAKpD,IAAI,IAChC,GAAAiD,mBAAA,GAAC9B,MAAM,CAACqB,UAAU,aAAjBS,mBAAA,CAAmB5B,MAAM,KAC1B,GAAA6B,sBAAA,GAAC/B,MAAM,CAACwB,cAAc,aAArBO,sBAAA,CAAuB7B,MAAM,KAC9B,GAAA8B,gBAAA,GAAChC,MAAM,CAAC4B,QAAQ,aAAfI,gBAAA,CAAiB9B,MAAM,GACxB;IACA;EACF;AACF,CAAC;AAOC,CACE,CAAC,UAAU,EAAE,IAAI,CAAC,EAClB,CAAC,OAAO,EAAE,IAAI,CAAC,EACf,CAAC,MAAM,EAAE,IAAI,CAAC,EACd,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAC1B,CAAC,iBAAiB,EAAE,IAAI,CAAC,EACzB,CAAC,cAAc,EAAE,IAAI,CAAC,CACvB,CACDgC,OAAO,CAAC,UAAU,CAACC,IAAI,EAAEC,OAAO,CAAC,EAAE;EACnC,CAACD,IAAI,CAAW,CACbE,MAAM,CAACvE,kBAAkB,CAACqE,IAAI,CAAC,IAAI,EAAE,CAAC,CACtCD,OAAO,CAAC,UAAUC,IAAI,EAAE;IACvB,MAAMG,GAAG,GAAGF,OAAO,GAAG,KAA4C,GAAG,CAAC;IACtEvC,KAAK,CAACsC,IAAI,CAAC,GAAG,MAAMG,GAAG;EACzB,CAAC,CAAC;AACN,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/generator/lib/printer.js index 422836943..ff17be075 100644 --- a/node_modules/@babel/generator/lib/printer.js +++ b/node_modules/@babel/generator/lib/printer.js @@ -8,6 +8,7 @@ var _buffer = require("./buffer"); var n = require("./node"); var _t = require("@babel/types"); var generatorFunctions = require("./generators"); +require("@jridgewell/trace-mapping"); const { isFunction, isStatement, @@ -45,23 +46,21 @@ class Printer { this._buf = new _buffer.default(map); this._indentChar = format.indent.style.charCodeAt(0); this._indentRepeat = format.indent.style.length; + this._inputMap = map == null ? void 0 : map._inputMap; } generate(ast) { this.print(ast); this._maybeAddAuxComment(); return this._buf.get(); } - indent() { if (this.format.compact || this.format.concise) return; this._indent++; } - dedent() { if (this.format.compact || this.format.concise) return; this._indent--; } - semicolon(force = false) { this._maybeAddAuxComment(); if (force) { @@ -71,14 +70,12 @@ class Printer { } this._noLineTerminator = false; } - rightBrace() { if (this.format.minified) { this._buf.removeLastSemicolon(); } this.tokenChar(125); } - space(force = false) { if (this.format.compact) return; if (force) { @@ -90,10 +87,8 @@ class Printer { } } } - word(str, noLineTerminatorAfter = false) { this._maybePrintInnerComments(); - if (this._endsWithWord || str.charCodeAt(0) === 47 && this.endsWith(47)) { this._space(); } @@ -102,21 +97,15 @@ class Printer { this._endsWithWord = true; this._noLineTerminator = noLineTerminatorAfter; } - number(str) { this.word(str); - this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46; } - token(str, maybeNewline = false) { this._maybePrintInnerComments(); - const lastChar = this.getLastChar(); const strFirst = str.charCodeAt(0); - if (lastChar === 33 && str === "--" || - strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || - strFirst === 46 && this._endsWithInteger) { + if (lastChar === 33 && str === "--" || strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || strFirst === 46 && this._endsWithInteger) { this._space(); } this._maybeAddAuxComment(); @@ -125,18 +114,14 @@ class Printer { } tokenChar(char) { this._maybePrintInnerComments(); - const lastChar = this.getLastChar(); - if ( - char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || - char === 46 && this._endsWithInteger) { + if (char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || char === 46 && this._endsWithInteger) { this._space(); } this._maybeAddAuxComment(); this._appendChar(char); this._noLineTerminator = false; } - newline(i = 1, force) { if (i <= 0) return; if (!force) { @@ -147,7 +132,6 @@ class Printer { } } if (i > 2) i = 2; - i -= this._buf.getNewlineCount(); for (let j = 0; j < i; j++) { this._newline(); @@ -167,7 +151,10 @@ class Printer { this._buf.removeTrailingNewline(); } exactSource(loc, cb) { - if (!loc) return cb(); + if (!loc) { + cb(); + return; + } this._catchUp("start", loc); this._buf.exactSource(loc, cb); } @@ -182,10 +169,19 @@ class Printer { this._buf.sourceWithOffset(prop, loc, lineOffset, columnOffset); } withSource(prop, loc, cb) { - if (!loc) return cb(); + if (!loc) { + cb(); + return; + } this._catchUp(prop, loc); this._buf.withSource(prop, loc, cb); } + sourceIdentifierName(identifierName, pos) { + if (!this._buf._canMarkIdName) return; + const sourcePosition = this._buf._sourcePosition; + sourcePosition.identifierNamePos = pos; + sourcePosition.identifierName = identifierName; + } _space() { this._queue(32); } @@ -226,11 +222,9 @@ class Printer { _maybeAddParenChar(char) { const parenPushNewlineState = this._parenPushNewlineState; if (!parenPushNewlineState) return; - if (char === 32) { return; } - if (char !== 10) { this._parenPushNewlineState = null; return; @@ -242,29 +236,23 @@ class Printer { _maybeAddParen(str) { const parenPushNewlineState = this._parenPushNewlineState; if (!parenPushNewlineState) return; - const len = str.length; let i; for (i = 0; i < len && str.charCodeAt(i) === 32; i++) continue; if (i === len) { return; } - const cha = str.charCodeAt(i); if (cha !== 10) { - if ( - cha !== 47 || - i + 1 === len) { + if (cha !== 47 || i + 1 === len) { this._parenPushNewlineState = null; return; } const chaPost = str.charCodeAt(i + 1); if (chaPost === 42) { - if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) { return; } - } else if (chaPost !== 47) { this._parenPushNewlineState = null; return; @@ -276,7 +264,6 @@ class Printer { } catchUp(line) { if (!this.format.retainLines) return; - const count = line - this._buf.getCurrentLine(); for (let i = 0; i < count; i++) { this._newline(); @@ -284,7 +271,6 @@ class Printer { } _catchUp(prop, loc) { if (!this.format.retainLines) return; - const pos = loc ? loc[prop] : null; if ((pos == null ? void 0 : pos.line) != null) { const count = pos.line - this._buf.getCurrentLine(); @@ -293,7 +279,6 @@ class Printer { } } } - _getIndent() { return this._indentRepeat * this._indent; } @@ -314,15 +299,13 @@ class Printer { } } } - print(node, parent, noLineTerminatorAfter, - trailingCommentsLineOffset, forceParens) { + print(node, parent, noLineTerminatorAfter, trailingCommentsLineOffset, forceParens) { if (!node) return; this._endsWithInnerRaw = false; const nodeType = node.type; const format = this.format; const oldConcise = format.concise; - if ( - node._compact) { + if (node._compact) { format.concise = true; } const printMethod = this[nodeType]; @@ -359,7 +342,6 @@ class Printer { } else { this._printTrailingComments(node, parent, trailingCommentsLineOffset); } - this._printStack.pop(); format.concise = oldConcise; this._insideAux = oldInAux; @@ -480,17 +462,16 @@ class Printer { } printSequence(nodes, parent, opts = {}) { opts.statement = true; - return this.printJoin(nodes, parent, opts); + this.printJoin(nodes, parent, opts); } printList(items, parent, opts = {}) { if (opts.separator == null) { opts.separator = commaSeparator; } - return this.printJoin(items, parent, opts); + this.printJoin(items, parent, opts); } _printNewline(newLine, opts) { if (this.format.retainLines || this.format.compact) return; - if (this.format.concise) { this.space(); return; @@ -507,13 +488,10 @@ class Printer { return; } } - if (this._buf.hasContent()) { - this.newline(1); } } - _shouldPrintComment(comment) { if (comment.ignore) return 0; if (this._printedComments.has(comment)) return 0; @@ -529,7 +507,6 @@ class Printer { _printComment(comment, skipNewLines) { const noLineTerminator = this._noLineTerminator; const isBlockComment = comment.type === "CommentBlock"; - const printNewLines = isBlockComment && skipNewLines !== 1 && !this._noLineTerminator; if (printNewLines && this._buf.hasContent() && skipNewLines !== 2) { this.newline(1); @@ -559,7 +536,6 @@ class Printer { } else { val = `/*${comment.value}*/`; } - if (this.endsWith(47)) this._space(); this.source("start", comment.loc); this._append(val, isBlockComment); @@ -638,7 +614,6 @@ class Printer { this._printComment(comment, 0); } } else if (type === 1 && !(node.type === "ObjectExpression" && node.properties.length > 1) && node.type !== "ClassBody" && node.type !== "TSInterfaceBody") { - this._printComment(comment, i === 0 ? 2 : i === len - 1 ? 3 : 0); } else { this._printComment(comment, 0); @@ -650,7 +625,6 @@ class Printer { } } } - Object.assign(Printer.prototype, generatorFunctions); { Printer.prototype.Noop = function Noop() {}; diff --git a/node_modules/@babel/generator/lib/printer.js.map b/node_modules/@babel/generator/lib/printer.js.map index b11be9603..f16d07c11 100644 --- a/node_modules/@babel/generator/lib/printer.js.map +++ b/node_modules/@babel/generator/lib/printer.js.map @@ -1 +1 @@ -{"version":3,"names":["isFunction","isStatement","isClassBody","isTSInterfaceBody","isTSEnumDeclaration","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","NON_DECIMAL_LITERAL","PURE_ANNOTATION_RE","HAS_NEWLINE","HAS_BlOCK_COMMENT_END","needsParens","n","Printer","constructor","format","map","inForStatementInitCounter","_printStack","_indent","_indentChar","_indentRepeat","_insideAux","_parenPushNewlineState","_noLineTerminator","_printAuxAfterOnNextUserNode","_printedComments","Set","_endsWithInteger","_endsWithWord","_lastCommentLine","_endsWithInnerRaw","_indentInnerComments","_buf","Buffer","indent","style","charCodeAt","length","generate","ast","print","_maybeAddAuxComment","get","compact","concise","dedent","semicolon","force","_appendChar","_queue","rightBrace","minified","removeLastSemicolon","token","space","_space","hasContent","lastCp","getLastChar","word","str","noLineTerminatorAfter","_maybePrintInnerComments","endsWith","_append","number","Number","isInteger","test","maybeNewline","lastChar","strFirst","tokenChar","char","newline","i","retainLines","getNewlineCount","j","_newline","endsWithCharAndNewline","removeTrailingNewline","exactSource","loc","cb","_catchUp","source","prop","sourceWithOffset","lineOffset","columnOffset","withSource","_maybeAddParen","_maybeIndent","append","_maybeAddParenChar","appendChar","queue","firstChar","queueIndentation","_getIndent","_shouldIndent","parenPushNewlineState","printed","len","cha","chaPost","slice","catchUp","line","count","getCurrentLine","pos","printTerminatorless","node","parent","isLabel","terminatorState","trailingCommentsLineOffset","forceParens","nodeType","type","oldConcise","_compact","printMethod","undefined","ReferenceError","JSON","stringify","name","push","oldInAux","shouldPrintParens","retainFunctionParens","extra","parenthesized","_printLeadingComments","bind","_printTrailingComments","pop","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","auxiliaryCommentBefore","_printComment","value","auxiliaryCommentAfter","getPossibleRaw","raw","rawValue","printJoin","nodes","opts","newlineOpts","addNewlines","nextNodeStartLine","separator","statement","_printNewline","iterator","nextNode","start","printAndIndentOnComments","leadingComments","printBlock","body","innerComments","trailingComments","_printComments","comments","printInnerComments","hasSpace","printedCommentsCount","size","noIndentInnerCommentsHere","printSequence","printList","items","commaSeparator","newLine","startLine","lastCommentLine","offset","_shouldPrintComment","ignore","has","add","shouldPrintComment","skipNewLines","noLineTerminator","isBlockComment","printNewLines","lastCharCode","val","adjustMultilineComment","column","newlineRegex","RegExp","replace","indentSize","getCurrentColumn","repeat","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","end","lastLine","leadingCommentNewline","shouldPrint","commentStartLine","commentEndLine","Math","max","min","singleLine","shouldSkipNewline","properties","Object","assign","prototype","generatorFunctions","Noop"],"sources":["../src/printer.ts"],"sourcesContent":["import Buffer from \"./buffer\";\nimport type { Loc } from \"./buffer\";\nimport * as n from \"./node\";\nimport type * as t from \"@babel/types\";\nimport {\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n isTSEnumDeclaration,\n} from \"@babel/types\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport * as generatorFunctions from \"./generators\";\nimport type SourceMap from \"./source-map\";\nimport * as charCodes from \"charcodes\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst NON_DECIMAL_LITERAL = /^0[box]/;\nconst PURE_ANNOTATION_RE = /^\\s*[@#]__PURE__\\s*$/;\nconst HAS_NEWLINE = /[\\n\\r\\u2028\\u2029]/;\nconst HAS_BlOCK_COMMENT_END = /\\*\\//;\n\nconst { needsParens } = n;\n\nconst enum COMMENT_TYPE {\n LEADING,\n INNER,\n TRAILING,\n}\n\nconst enum COMMENT_SKIP_NEWLINE {\n DEFAULT,\n ALL,\n LEADING,\n TRAILING,\n}\n\nconst enum PRINT_COMMENT_HINT {\n SKIP,\n ALLOW,\n DEFER,\n}\n\nexport type Format = {\n shouldPrintComment: (comment: string) => boolean;\n retainLines: boolean;\n retainFunctionParens: boolean;\n comments: boolean;\n auxiliaryCommentBefore: string;\n auxiliaryCommentAfter: string;\n compact: boolean | \"auto\";\n minified: boolean;\n concise: boolean;\n indent: {\n adjustMultilineComment: boolean;\n style: string;\n };\n recordAndTupleSyntaxType: RecordAndTuplePluginOptions[\"syntaxType\"];\n jsescOption: jsescOptions;\n jsonCompatibleStrings?: boolean;\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n /**\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n};\n\ninterface AddNewlinesOptions {\n addNewlines(leading: boolean, node: t.Node): number;\n nextNodeStartLine: number;\n}\n\ninterface PrintSequenceOptions extends Partial {\n statement?: boolean;\n indent?: boolean;\n trailingCommentsLineOffset?: number;\n}\n\ninterface PrintListOptions {\n separator?: (this: Printer) => void;\n iterator?: (node: t.Node, index: number) => void;\n statement?: boolean;\n indent?: boolean;\n}\n\nexport type PrintJoinOptions = PrintListOptions & PrintSequenceOptions;\nclass Printer {\n constructor(format: Format, map: SourceMap) {\n this.format = format;\n this._buf = new Buffer(map);\n\n this._indentChar = format.indent.style.charCodeAt(0);\n this._indentRepeat = format.indent.style.length;\n }\n\n declare format: Format;\n inForStatementInitCounter: number = 0;\n\n declare _buf: Buffer;\n _printStack: Array = [];\n _indent: number = 0;\n _indentChar: number = 0;\n _indentRepeat: number = 0;\n _insideAux: boolean = false;\n _parenPushNewlineState: { printed: boolean } | null = null;\n _noLineTerminator: boolean = false;\n _printAuxAfterOnNextUserNode: boolean = false;\n _printedComments = new Set();\n _endsWithInteger = false;\n _endsWithWord = false;\n _lastCommentLine = 0;\n _endsWithInnerRaw: boolean = false;\n _indentInnerComments: boolean = true;\n\n generate(ast: t.Node) {\n this.print(ast);\n this._maybeAddAuxComment();\n\n return this._buf.get();\n }\n\n /**\n * Increment indent size.\n */\n\n indent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent++;\n }\n\n /**\n * Decrement indent size.\n */\n\n dedent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent--;\n }\n\n /**\n * Add a semicolon to the buffer.\n */\n\n semicolon(force: boolean = false): void {\n this._maybeAddAuxComment();\n if (force) {\n this._appendChar(charCodes.semicolon);\n } else {\n this._queue(charCodes.semicolon);\n }\n this._noLineTerminator = false;\n }\n\n /**\n * Add a right brace to the buffer.\n */\n\n rightBrace(): void {\n if (this.format.minified) {\n this._buf.removeLastSemicolon();\n }\n this.token(\"}\");\n }\n\n /**\n * Add a space to the buffer unless it is compact.\n */\n\n space(force: boolean = false): void {\n if (this.format.compact) return;\n\n if (force) {\n this._space();\n } else if (this._buf.hasContent()) {\n const lastCp = this.getLastChar();\n if (lastCp !== charCodes.space && lastCp !== charCodes.lineFeed) {\n this._space();\n }\n }\n }\n\n /**\n * Writes a token that can't be safely parsed without taking whitespace into account.\n */\n\n word(str: string, noLineTerminatorAfter: boolean = false): void {\n this._maybePrintInnerComments();\n\n // prevent concatenating words and creating // comment out of division and regex\n if (\n this._endsWithWord ||\n (str.charCodeAt(0) === charCodes.slash && this.endsWith(charCodes.slash))\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, false);\n\n this._endsWithWord = true;\n this._noLineTerminator = noLineTerminatorAfter;\n }\n\n /**\n * Writes a number token so that we can validate if it is an integer.\n */\n\n number(str: string): void {\n this.word(str);\n\n // Integer tokens need special handling because they cannot have '.'s inserted\n // immediately after them.\n this._endsWithInteger =\n Number.isInteger(+str) &&\n !NON_DECIMAL_LITERAL.test(str) &&\n !SCIENTIFIC_NOTATION.test(str) &&\n !ZERO_DECIMAL_INTEGER.test(str) &&\n str.charCodeAt(str.length - 1) !== charCodes.dot;\n }\n\n /**\n * Writes a simple token.\n */\n\n token(str: string, maybeNewline = false): void {\n this._maybePrintInnerComments();\n\n // space is mandatory to avoid outputting ` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (ch === charCodes.lessThan && !this.inModule) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // `` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // ` ## Technology Sponsors diff --git a/node_modules/eslint/conf/eslint-all.js b/node_modules/eslint/conf/eslint-all.js deleted file mode 100644 index 10c5304fd..000000000 --- a/node_modules/eslint/conf/eslint-all.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @fileoverview Config to enable all rules. - * @author Robert Fletcher - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const builtInRules = require("../lib/rules"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const allRules = {}; - -for (const [ruleId, rule] of builtInRules) { - if (!rule.meta.deprecated) { - allRules[ruleId] = "error"; - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** @type {import("../lib/shared/types").ConfigData} */ -module.exports = { rules: allRules }; diff --git a/node_modules/eslint/conf/rule-type-list.json b/node_modules/eslint/conf/rule-type-list.json index 517f82191..d5823acc8 100644 --- a/node_modules/eslint/conf/rule-type-list.json +++ b/node_modules/eslint/conf/rule-type-list.json @@ -6,12 +6,12 @@ ], "deprecated": { "name": "Deprecated", - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", + "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", "rules": [] }, "removed": { "name": "Removed", - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", + "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", "rules": [ { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, { "removed": "global-strict", "replacedBy": ["strict"] }, diff --git a/node_modules/eslint/lib/cli-engine/cli-engine.js b/node_modules/eslint/lib/cli-engine/cli-engine.js index fdc661988..5bca1618b 100644 --- a/node_modules/eslint/lib/cli-engine/cli-engine.js +++ b/node_modules/eslint/lib/cli-engine/cli-engine.js @@ -615,8 +615,8 @@ class CLIEngine { useEslintrc: options.useEslintrc, builtInRules, loadRules, - getEslintRecommendedConfig: () => require("../../conf/eslint-recommended.js"), - getEslintAllConfig: () => require("../../conf/eslint-all.js") + getEslintRecommendedConfig: () => require("@eslint/js").configs.recommended, + getEslintAllConfig: () => require("@eslint/js").configs.all }); const fileEnumerator = new FileEnumerator({ configArrayFactory, diff --git a/node_modules/eslint/lib/cli-engine/file-enumerator.js b/node_modules/eslint/lib/cli-engine/file-enumerator.js index b65d0a206..5dff8d09c 100644 --- a/node_modules/eslint/lib/cli-engine/file-enumerator.js +++ b/node_modules/eslint/lib/cli-engine/file-enumerator.js @@ -217,8 +217,8 @@ class FileEnumerator { cwd = process.cwd(), configArrayFactory = new CascadingConfigArrayFactory({ cwd, - getEslintRecommendedConfig: () => require("../../conf/eslint-recommended.js"), - getEslintAllConfig: () => require("../../conf/eslint-all.js") + getEslintRecommendedConfig: () => require("@eslint/js").configs.recommended, + getEslintAllConfig: () => require("@eslint/js").configs.all }), extensions = null, globInputPaths = true, @@ -349,7 +349,7 @@ class FileEnumerator { return this._iterateFilesWithFile(absolutePath); } if (globInputPaths && isGlobPattern(pattern)) { - return this._iterateFilesWithGlob(absolutePath, isDot); + return this._iterateFilesWithGlob(pattern, isDot); } return []; @@ -398,15 +398,17 @@ class FileEnumerator { _iterateFilesWithGlob(pattern, dotfiles) { debug(`Glob: ${pattern}`); - const directoryPath = path.resolve(getGlobParent(pattern)); - const globPart = pattern.slice(directoryPath.length + 1); + const { cwd } = internalSlotsMap.get(this); + const directoryPath = path.resolve(cwd, getGlobParent(pattern)); + const absolutePath = path.resolve(cwd, pattern); + const globPart = absolutePath.slice(directoryPath.length + 1); /* * recursive if there are `**` or path separators in the glob part. * Otherwise, patterns such as `src/*.js`, it doesn't need recursive. */ const recursive = /\*\*|\/|\\/u.test(globPart); - const selector = new Minimatch(pattern, minimatchOpts); + const selector = new Minimatch(absolutePath, minimatchOpts); debug(`recursive? ${recursive}`); diff --git a/node_modules/eslint/lib/config/flat-config-array.js b/node_modules/eslint/lib/config/flat-config-array.js index 24b456da5..78b4ef44b 100644 --- a/node_modules/eslint/lib/config/flat-config-array.js +++ b/node_modules/eslint/lib/config/flat-config-array.js @@ -13,7 +13,7 @@ const { ConfigArray, ConfigArraySymbol } = require("@humanwhocodes/config-array" const { flatConfigSchema } = require("./flat-config-schema"); const { RuleValidator } = require("./rule-validator"); const { defaultConfig } = require("./default-config"); -const recommendedConfig = require("../../conf/eslint-recommended"); +const jsPlugin = require("@eslint/js"); //----------------------------------------------------------------------------- // Helpers @@ -36,6 +36,45 @@ function splitPluginIdentifier(identifier) { }; } +/** + * Returns the name of an object in the config by reading its `meta` key. + * @param {Object} object The object to check. + * @returns {string?} The name of the object if found or `null` if there + * is no name. + */ +function getObjectId(object) { + + // first check old-style name + let name = object.name; + + if (!name) { + + if (!object.meta) { + return null; + } + + name = object.meta.name; + + if (!name) { + return null; + } + } + + // now check for old-style version + let version = object.version; + + if (!version) { + version = object.meta && object.meta.version; + } + + // if there's a version then append that + if (version) { + return `${name}@${version}`; + } + + return name; +} + const originalBaseConfig = Symbol("originalBaseConfig"); //----------------------------------------------------------------------------- @@ -96,17 +135,23 @@ class FlatConfigArray extends ConfigArray { */ [ConfigArraySymbol.preprocessConfig](config) { if (config === "eslint:recommended") { - return recommendedConfig; + + // if we are in a Node.js environment warn the user + if (typeof process !== "undefined" && process.emitWarning) { + process.emitWarning("The 'eslint:recommended' string configuration is deprecated and will be replaced by the @eslint/js package's 'recommended' config."); + } + + return jsPlugin.configs.recommended; } if (config === "eslint:all") { - /* - * Load `eslint-all.js` here instead of at the top level to avoid loading all rule modules - * when it isn't necessary. `eslint-all.js` reads `meta` of rule objects to filter out deprecated ones, - * so requiring `eslint-all.js` module loads all rule modules as a consequence. - */ - return require("../../conf/eslint-all"); + // if we are in a Node.js environment warn the user + if (typeof process !== "undefined" && process.emitWarning) { + process.emitWarning("The 'eslint:all' string configuration is deprecated and will be replaced by the @eslint/js package's 'all' config."); + } + + return jsPlugin.configs.all; } /* @@ -145,16 +190,25 @@ class FlatConfigArray extends ConfigArray { // Check parser value if (languageOptions && languageOptions.parser) { - if (typeof languageOptions.parser === "string") { - const { pluginName, objectName: localParserName } = splitPluginIdentifier(languageOptions.parser); + const { parser } = languageOptions; - parserName = languageOptions.parser; + if (typeof parser === "string") { + const { pluginName, objectName: localParserName } = splitPluginIdentifier(parser); + + parserName = parser; if (!plugins || !plugins[pluginName] || !plugins[pluginName].parsers || !plugins[pluginName].parsers[localParserName]) { throw new TypeError(`Key "parser": Could not find "${localParserName}" in plugin "${pluginName}".`); } languageOptions.parser = plugins[pluginName].parsers[localParserName]; + } else if (typeof parser === "object") { + parserName = getObjectId(parser); + + if (!parserName) { + invalidParser = true; + } + } else { invalidParser = true; } @@ -172,6 +226,13 @@ class FlatConfigArray extends ConfigArray { } config.processor = plugins[pluginName].processors[localProcessorName]; + } else if (typeof processor === "object") { + processorName = getObjectId(processor); + + if (!processorName) { + invalidProcessor = true; + } + } else { invalidProcessor = true; } @@ -185,11 +246,11 @@ class FlatConfigArray extends ConfigArray { value: function() { if (invalidParser) { - throw new Error("Caching is not supported when parser is an object."); + throw new Error("Could not serialize parser object (missing 'meta' object)."); } if (invalidProcessor) { - throw new Error("Caching is not supported when processor is an object."); + throw new Error("Could not serialize processor object (missing 'meta' object)."); } return { diff --git a/node_modules/eslint/lib/eslint/eslint-helpers.js b/node_modules/eslint/lib/eslint/eslint-helpers.js index 5c5ed299c..54b0c69d7 100644 --- a/node_modules/eslint/lib/eslint/eslint-helpers.js +++ b/node_modules/eslint/lib/eslint/eslint-helpers.js @@ -223,7 +223,7 @@ function globMatch({ basePath, pattern }) { * should be thrown when a pattern is unmatched. * @returns {Promise>} An array of matching file paths * or an empty array if there are no matches. - * @throws {UnmatchedSearchPatternsErrror} If there is a pattern that doesn't + * @throws {UnmatchedSearchPatternsError} If there is a pattern that doesn't * match any files. */ async function globSearch({ @@ -526,9 +526,9 @@ async function findFiles({ } // save patterns for later use based on whether globs are enabled - if (globInputPaths && isGlobPattern(filePath)) { + if (globInputPaths && isGlobPattern(pattern)) { - const basePath = globParent(filePath); + const basePath = path.resolve(cwd, globParent(pattern)); // group in cwd if possible and split out others if (isPathInside(basePath, cwd)) { @@ -568,41 +568,6 @@ async function findFiles({ ]; } - -/** - * Checks whether a file exists at the given location - * @param {string} resolvedPath A path from the CWD - * @throws {Error} As thrown by `fs.statSync` or `fs.isFile`. - * @returns {boolean} `true` if a file exists - */ -function fileExists(resolvedPath) { - try { - return fs.statSync(resolvedPath).isFile(); - } catch (error) { - if (error && (error.code === "ENOENT" || error.code === "ENOTDIR")) { - return false; - } - throw error; - } -} - -/** - * Checks whether a directory exists at the given location - * @param {string} resolvedPath A path from the CWD - * @throws {Error} As thrown by `fs.statSync` or `fs.isDirectory`. - * @returns {boolean} `true` if a directory exists - */ -function directoryExists(resolvedPath) { - try { - return fs.statSync(resolvedPath).isDirectory(); - } catch (error) { - if (error && (error.code === "ENOENT" || error.code === "ENOTDIR")) { - return false; - } - throw error; - } -} - //----------------------------------------------------------------------------- // Results-related Helpers //----------------------------------------------------------------------------- @@ -924,8 +889,6 @@ function getCacheFile(cacheFile, cwd) { module.exports = { isGlobPattern, - directoryExists, - fileExists, findFiles, isNonEmptyString, diff --git a/node_modules/eslint/lib/rules/array-callback-return.js b/node_modules/eslint/lib/rules/array-callback-return.js index bac25b111..2b0a85592 100644 --- a/node_modules/eslint/lib/rules/array-callback-return.js +++ b/node_modules/eslint/lib/rules/array-callback-return.js @@ -16,7 +16,7 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/u; -const TARGET_METHODS = /^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort)$/u; +const TARGET_METHODS = /^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u; /** * Checks a given code path segment is reachable. diff --git a/node_modules/eslint/lib/rules/array-element-newline.js b/node_modules/eslint/lib/rules/array-element-newline.js index c762755bd..7ac03ae56 100644 --- a/node_modules/eslint/lib/rules/array-element-newline.js +++ b/node_modules/eslint/lib/rules/array-element-newline.js @@ -47,6 +47,7 @@ module.exports = { ] } }, + type: "array", items: [ { oneOf: [ diff --git a/node_modules/eslint/lib/rules/lines-around-comment.js b/node_modules/eslint/lib/rules/lines-around-comment.js index 64f7f6c5f..ece43b141 100644 --- a/node_modules/eslint/lib/rules/lines-around-comment.js +++ b/node_modules/eslint/lib/rules/lines-around-comment.js @@ -113,6 +113,10 @@ module.exports = { }, applyDefaultIgnorePatterns: { type: "boolean" + }, + afterHashbangComment: { + type: "boolean", + default: false } }, additionalProperties: false @@ -449,6 +453,13 @@ module.exports = { before: options.beforeBlockComment }); } + } else if (token.type === "Shebang") { + if (options.afterHashbangComment) { + checkForEmptyLine(token, { + after: options.afterHashbangComment, + before: false + }); + } } }); } diff --git a/node_modules/eslint/lib/rules/logical-assignment-operators.js b/node_modules/eslint/lib/rules/logical-assignment-operators.js index bd2357acf..cd533e63a 100644 --- a/node_modules/eslint/lib/rules/logical-assignment-operators.js +++ b/node_modules/eslint/lib/rules/logical-assignment-operators.js @@ -112,7 +112,7 @@ function isBooleanCast(expression, scope) { /** * Returns true for: * truthiness checks: value, Boolean(value), !!value - * falsyness checks: !value, !Boolean(value) + * falsiness checks: !value, !Boolean(value) * nullish checks: value == null, value === undefined || value === null * @param {ASTNode} expression Test condition * @param {import('eslint-scope').Scope} scope Scope of the expression diff --git a/node_modules/eslint/lib/rules/multiline-comment-style.js b/node_modules/eslint/lib/rules/multiline-comment-style.js index 68cd66653..9cb7f3473 100644 --- a/node_modules/eslint/lib/rules/multiline-comment-style.js +++ b/node_modules/eslint/lib/rules/multiline-comment-style.js @@ -22,7 +22,37 @@ module.exports = { }, fixable: "whitespace", - schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }], + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["starred-block", "bare-block"] + } + ], + additionalItems: false + }, + { + type: "array", + items: [ + { + enum: ["separate-lines"] + }, + { + type: "object", + properties: { + checkJSDoc: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + additionalItems: false + } + ] + }, messages: { expectedBlock: "Expected a block comment instead of consecutive line comments.", expectedBareBlock: "Expected a block comment without padding stars.", @@ -37,6 +67,8 @@ module.exports = { create(context) { const sourceCode = context.getSourceCode(); const option = context.options[0] || "starred-block"; + const params = context.options[1] || {}; + const checkJSDoc = !!params.checkJSDoc; //---------------------------------------------------------------------- // Helpers @@ -333,11 +365,18 @@ module.exports = { "separate-lines"(commentGroup) { const [firstComment] = commentGroup; - if (firstComment.type !== "Block" || isJSDocComment(commentGroup)) { + const isJSDoc = isJSDocComment(commentGroup); + + if (firstComment.type !== "Block" || (!checkJSDoc && isJSDoc)) { return; } - const commentLines = getCommentLines(commentGroup); + let commentLines = getCommentLines(commentGroup); + + if (isJSDoc) { + commentLines = commentLines.slice(1, commentLines.length - 1); + } + const tokenAfter = sourceCode.getTokenAfter(firstComment, { includeComments: true }); if (tokenAfter && firstComment.loc.end.line === tokenAfter.loc.start.line) { diff --git a/node_modules/eslint/lib/rules/no-constant-binary-expression.js b/node_modules/eslint/lib/rules/no-constant-binary-expression.js index dccfa2f58..2cd8928eb 100644 --- a/node_modules/eslint/lib/rules/no-constant-binary-expression.js +++ b/node_modules/eslint/lib/rules/no-constant-binary-expression.js @@ -14,6 +14,23 @@ const NUMERIC_OR_STRING_BINARY_OPERATORS = new Set(["+", "-", "*", "/", "%", "|" // Helpers //------------------------------------------------------------------------------ +/** + * Checks whether or not a node is `null` or `undefined`. Similar to the one + * found in ast-utils.js, but this one correctly handles the edge case that + * `undefined` has been redefined. + * @param {Scope} scope Scope in which the expression was found. + * @param {ASTNode} node A node to check. + * @returns {boolean} Whether or not the node is a `null` or `undefined`. + * @public + */ +function isNullOrUndefined(scope, node) { + return ( + isNullLiteral(node) || + (node.type === "Identifier" && node.name === "undefined" && isReferenceToGlobalVariable(scope, node)) || + (node.type === "UnaryExpression" && node.operator === "void") + ); +} + /** * Test if an AST node has a statically knowable constant nullishness. Meaning, * it will always resolve to a constant value of either: `null`, `undefined` @@ -21,9 +38,14 @@ const NUMERIC_OR_STRING_BINARY_OPERATORS = new Set(["+", "-", "*", "/", "%", "|" * three states at runtime would return `false`. * @param {Scope} scope The scope in which the node was found. * @param {ASTNode} node The AST node being tested. + * @param {boolean} nonNullish if `true` then nullish values are not considered constant. * @returns {boolean} Does `node` have constant nullishness? */ -function hasConstantNullishness(scope, node) { +function hasConstantNullishness(scope, node, nonNullish) { + if (nonNullish && isNullOrUndefined(scope, node)) { + return false; + } + switch (node.type) { case "ObjectExpression": // Objects are never nullish case "ArrayExpression": // Arrays are never nullish @@ -45,9 +67,12 @@ function hasConstantNullishness(scope, node) { return (functionName === "Boolean" || functionName === "String" || functionName === "Number") && isReferenceToGlobalVariable(scope, node.callee); } + case "LogicalExpression": { + return node.operator === "??" && hasConstantNullishness(scope, node.right, true); + } case "AssignmentExpression": if (node.operator === "=") { - return hasConstantNullishness(scope, node.right); + return hasConstantNullishness(scope, node.right, nonNullish); } /* @@ -80,7 +105,7 @@ function hasConstantNullishness(scope, node) { case "SequenceExpression": { const last = node.expressions[node.expressions.length - 1]; - return hasConstantNullishness(scope, last); + return hasConstantNullishness(scope, last, nonNullish); } case "Identifier": return node.name === "undefined" && isReferenceToGlobalVariable(scope, node); @@ -348,7 +373,7 @@ function isAlwaysNew(scope, node) { * user-defined constructors could return a sentinel * object. * - * Catching these is especially useful for primitive constructures + * Catching these is especially useful for primitive constructors * which return boxed values, a surprising gotcha' in JavaScript. */ return Object.hasOwnProperty.call(globals.builtin, node.callee.name) && @@ -378,24 +403,6 @@ function isAlwaysNew(scope, node) { } } -/** - * Checks whether or not a node is `null` or `undefined`. Similar to the one - * found in ast-utils.js, but this one correctly handles the edge case that - * `undefined` has been redefined. - * @param {Scope} scope Scope in which the expression was found. - * @param {ASTNode} node A node to check. - * @returns {boolean} Whether or not the node is a `null` or `undefined`. - * @public - */ -function isNullOrUndefined(scope, node) { - return ( - isNullLiteral(node) || - (node.type === "Identifier" && node.name === "undefined" && isReferenceToGlobalVariable(scope, node)) || - (node.type === "UnaryExpression" && node.operator === "void") - ); -} - - /** * Checks if one operand will cause the result to be constant. * @param {Scope} scope Scope in which the expression was found. @@ -407,14 +414,14 @@ function isNullOrUndefined(scope, node) { function findBinaryExpressionConstantOperand(scope, a, b, operator) { if (operator === "==" || operator === "!=") { if ( - (isNullOrUndefined(scope, a) && hasConstantNullishness(scope, b)) || + (isNullOrUndefined(scope, a) && hasConstantNullishness(scope, b, false)) || (isStaticBoolean(scope, a) && hasConstantLooseBooleanComparison(scope, b)) ) { return b; } } else if (operator === "===" || operator === "!==") { if ( - (isNullOrUndefined(scope, a) && hasConstantNullishness(scope, b)) || + (isNullOrUndefined(scope, a) && hasConstantNullishness(scope, b, false)) || (isStaticBoolean(scope, a) && hasConstantStrictBooleanComparison(scope, b)) ) { return b; @@ -453,7 +460,7 @@ module.exports = { if ((operator === "&&" || operator === "||") && isConstant(scope, left, true)) { context.report({ node: left, messageId: "constantShortCircuit", data: { property: "truthiness", operator } }); - } else if (operator === "??" && hasConstantNullishness(scope, left)) { + } else if (operator === "??" && hasConstantNullishness(scope, left, false)) { context.report({ node: left, messageId: "constantShortCircuit", data: { property: "nullishness", operator } }); } }, diff --git a/node_modules/eslint/lib/rules/no-control-regex.js b/node_modules/eslint/lib/rules/no-control-regex.js index ba1084372..c42f86d12 100644 --- a/node_modules/eslint/lib/rules/no-control-regex.js +++ b/node_modules/eslint/lib/rules/no-control-regex.js @@ -5,7 +5,7 @@ "use strict"; -const RegExpValidator = require("regexpp").RegExpValidator; +const RegExpValidator = require("@eslint-community/regexpp").RegExpValidator; const collector = new (class { constructor() { this._source = ""; diff --git a/node_modules/eslint/lib/rules/no-eval.js b/node_modules/eslint/lib/rules/no-eval.js index 03f7b1f69..a1b32cc30 100644 --- a/node_modules/eslint/lib/rules/no-eval.js +++ b/node_modules/eslint/lib/rules/no-eval.js @@ -72,7 +72,7 @@ module.exports = { let funcInfo = null; /** - * Pushs a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack. + * Pushes a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack. * Top-level scopes are handled separately. * * This is used in order to check whether or not `this` binding is a diff --git a/node_modules/eslint/lib/rules/no-extra-boolean-cast.js b/node_modules/eslint/lib/rules/no-extra-boolean-cast.js index 45252fee0..5f9411b46 100644 --- a/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +++ b/node_modules/eslint/lib/rules/no-extra-boolean-cast.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const eslintUtils = require("eslint-utils"); +const eslintUtils = require("@eslint-community/eslint-utils"); const precedence = astUtils.getPrecedence; diff --git a/node_modules/eslint/lib/rules/no-extra-parens.js b/node_modules/eslint/lib/rules/no-extra-parens.js index 75ac606ea..efb01a337 100644 --- a/node_modules/eslint/lib/rules/no-extra-parens.js +++ b/node_modules/eslint/lib/rules/no-extra-parens.js @@ -8,7 +8,7 @@ // Rule Definition //------------------------------------------------------------------------------ -const { isParenthesized: isParenthesizedRaw } = require("eslint-utils"); +const { isParenthesized: isParenthesizedRaw } = require("@eslint-community/eslint-utils"); const astUtils = require("./utils/ast-utils.js"); /** @type {import('../shared/types').Rule} */ @@ -766,6 +766,38 @@ module.exports = { return false; } + /** + * Checks if the left-hand side of an assignment is an identifier, the operator is one of + * `=`, `&&=`, `||=` or `??=` and the right-hand side is an anonymous class or function. + * + * As per https://tc39.es/ecma262/#sec-assignment-operators-runtime-semantics-evaluation, an + * assignment involving one of the operators `=`, `&&=`, `||=` or `??=` where the right-hand + * side is an anonymous class or function and the left-hand side is an *unparenthesized* + * identifier has different semantics than other assignments. + * Specifically, when an expression like `foo = function () {}` is evaluated, `foo.name` + * will be set to the string "foo", i.e. the identifier name. The same thing does not happen + * when evaluating `(foo) = function () {}`. + * Since the parenthesizing of the identifier in the left-hand side is significant in this + * special case, the parentheses, if present, should not be flagged as unnecessary. + * @param {ASTNode} node an AssignmentExpression node. + * @returns {boolean} `true` if the left-hand side of the assignment is an identifier, the + * operator is one of `=`, `&&=`, `||=` or `??=` and the right-hand side is an anonymous + * class or function; otherwise, `false`. + */ + function isAnonymousFunctionAssignmentException({ left, operator, right }) { + if (left.type === "Identifier" && ["=", "&&=", "||=", "??="].includes(operator)) { + const rhsType = right.type; + + if (rhsType === "ArrowFunctionExpression") { + return true; + } + if ((rhsType === "FunctionExpression" || rhsType === "ClassExpression") && !right.id) { + return true; + } + } + return false; + } + return { ArrayExpression(node) { node.elements @@ -804,7 +836,8 @@ module.exports = { }, AssignmentExpression(node) { - if (canBeAssignmentTarget(node.left) && hasExcessParens(node.left)) { + if (canBeAssignmentTarget(node.left) && hasExcessParens(node.left) && + (!isAnonymousFunctionAssignmentException(node) || isParenthesisedTwice(node.left))) { report(node.left); } diff --git a/node_modules/eslint/lib/rules/no-implied-eval.js b/node_modules/eslint/lib/rules/no-implied-eval.js index 44f146171..c33b05d46 100644 --- a/node_modules/eslint/lib/rules/no-implied-eval.js +++ b/node_modules/eslint/lib/rules/no-implied-eval.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { getStaticValue } = require("eslint-utils"); +const { getStaticValue } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Rule Definition diff --git a/node_modules/eslint/lib/rules/no-import-assign.js b/node_modules/eslint/lib/rules/no-import-assign.js index fc104fe6c..6cf2e5198 100644 --- a/node_modules/eslint/lib/rules/no-import-assign.js +++ b/node_modules/eslint/lib/rules/no-import-assign.js @@ -9,7 +9,7 @@ // Helpers //------------------------------------------------------------------------------ -const { findVariable } = require("eslint-utils"); +const { findVariable } = require("@eslint-community/eslint-utils"); const astUtils = require("./utils/ast-utils"); const WellKnownMutationFunctions = { diff --git a/node_modules/eslint/lib/rules/no-invalid-regexp.js b/node_modules/eslint/lib/rules/no-invalid-regexp.js index 81b083536..b2e11a008 100644 --- a/node_modules/eslint/lib/rules/no-invalid-regexp.js +++ b/node_modules/eslint/lib/rules/no-invalid-regexp.js @@ -8,7 +8,7 @@ // Requirements //------------------------------------------------------------------------------ -const RegExpValidator = require("regexpp").RegExpValidator; +const RegExpValidator = require("@eslint-community/regexpp").RegExpValidator; const validator = new RegExpValidator(); const validFlags = /[dgimsuy]/gu; const undefined1 = void 0; diff --git a/node_modules/eslint/lib/rules/no-misleading-character-class.js b/node_modules/eslint/lib/rules/no-misleading-character-class.js index 5649f2e37..9aa7079e5 100644 --- a/node_modules/eslint/lib/rules/no-misleading-character-class.js +++ b/node_modules/eslint/lib/rules/no-misleading-character-class.js @@ -3,8 +3,8 @@ */ "use strict"; -const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("eslint-utils"); -const { RegExpValidator, RegExpParser, visitRegExpAST } = require("regexpp"); +const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("@eslint-community/eslint-utils"); +const { RegExpValidator, RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp"); const { isCombiningCharacter, isEmojiModifier, isRegionalIndicatorSymbol, isSurrogatePair } = require("./utils/unicode"); const astUtils = require("./utils/ast-utils.js"); diff --git a/node_modules/eslint/lib/rules/no-obj-calls.js b/node_modules/eslint/lib/rules/no-obj-calls.js index d24d28589..2e2cb5b24 100644 --- a/node_modules/eslint/lib/rules/no-obj-calls.js +++ b/node_modules/eslint/lib/rules/no-obj-calls.js @@ -9,7 +9,7 @@ // Requirements //------------------------------------------------------------------------------ -const { CALL, CONSTRUCT, ReferenceTracker } = require("eslint-utils"); +const { CALL, CONSTRUCT, ReferenceTracker } = require("@eslint-community/eslint-utils"); const getPropertyName = require("./utils/ast-utils").getStaticPropertyName; //------------------------------------------------------------------------------ diff --git a/node_modules/eslint/lib/rules/no-promise-executor-return.js b/node_modules/eslint/lib/rules/no-promise-executor-return.js index caa195ffa..e81ed1d04 100644 --- a/node_modules/eslint/lib/rules/no-promise-executor-return.js +++ b/node_modules/eslint/lib/rules/no-promise-executor-return.js @@ -9,7 +9,7 @@ // Requirements //------------------------------------------------------------------------------ -const { findVariable } = require("eslint-utils"); +const { findVariable } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Helpers diff --git a/node_modules/eslint/lib/rules/no-regex-spaces.js b/node_modules/eslint/lib/rules/no-regex-spaces.js index 6d74aabe2..e6564bc45 100644 --- a/node_modules/eslint/lib/rules/no-regex-spaces.js +++ b/node_modules/eslint/lib/rules/no-regex-spaces.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const regexpp = require("regexpp"); +const regexpp = require("@eslint-community/regexpp"); //------------------------------------------------------------------------------ // Helpers diff --git a/node_modules/eslint/lib/rules/no-restricted-exports.js b/node_modules/eslint/lib/rules/no-restricted-exports.js index d99e89282..d201e3b03 100644 --- a/node_modules/eslint/lib/rules/no-restricted-exports.js +++ b/node_modules/eslint/lib/rules/no-restricted-exports.js @@ -27,27 +27,78 @@ module.exports = { }, schema: [{ - type: "object", - properties: { - restrictedNamedExports: { - type: "array", - items: { - type: "string" + anyOf: [ + { + type: "object", + properties: { + restrictedNamedExports: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + } }, - uniqueItems: true + additionalProperties: false + }, + { + type: "object", + properties: { + restrictedNamedExports: { + type: "array", + items: { + type: "string", + pattern: "^(?!default$)" + }, + uniqueItems: true + }, + restrictDefaultExports: { + type: "object", + properties: { + + // Allow/Disallow `export default foo; export default 42; export default function foo() {}` format + direct: { + type: "boolean" + }, + + // Allow/Disallow `export { foo as default };` declarations + named: { + type: "boolean" + }, + + // Allow/Disallow `export { default } from "mod"; export { default as default } from "mod";` declarations + defaultFrom: { + type: "boolean" + }, + + // Allow/Disallow `export { foo as default } from "mod";` declarations + namedFrom: { + type: "boolean" + }, + + // Allow/Disallow `export * as default from "mod"`; declarations + namespaceFrom: { + type: "boolean" + } + }, + additionalProperties: false + } + }, + additionalProperties: false } - }, - additionalProperties: false + ] }], messages: { - restrictedNamed: "'{{name}}' is restricted from being used as an exported name." + restrictedNamed: "'{{name}}' is restricted from being used as an exported name.", + restrictedDefault: "Exporting 'default' is restricted." } }, create(context) { const restrictedNames = new Set(context.options[0] && context.options[0].restrictedNamedExports); + const restrictDefaultExports = context.options[0] && context.options[0].restrictDefaultExports; /** * Checks and reports given exported name. @@ -63,6 +114,42 @@ module.exports = { messageId: "restrictedNamed", data: { name } }); + return; + } + + if (name === "default") { + if (node.parent.type === "ExportAllDeclaration") { + if (restrictDefaultExports && restrictDefaultExports.namespaceFrom) { + context.report({ + node, + messageId: "restrictedDefault" + }); + } + + } else { // ExportSpecifier + const isSourceSpecified = !!node.parent.parent.source; + const specifierLocalName = astUtils.getModuleExportName(node.parent.local); + + if (!isSourceSpecified && restrictDefaultExports && restrictDefaultExports.named) { + context.report({ + node, + messageId: "restrictedDefault" + }); + return; + } + + if (isSourceSpecified && restrictDefaultExports) { + if ( + (specifierLocalName === "default" && restrictDefaultExports.defaultFrom) || + (specifierLocalName !== "default" && restrictDefaultExports.namedFrom) + ) { + context.report({ + node, + messageId: "restrictedDefault" + }); + } + } + } } } @@ -73,6 +160,15 @@ module.exports = { } }, + ExportDefaultDeclaration(node) { + if (restrictDefaultExports && restrictDefaultExports.direct) { + context.report({ + node, + messageId: "restrictedDefault" + }); + } + }, + ExportNamedDeclaration(node) { const declaration = node.declaration; diff --git a/node_modules/eslint/lib/rules/no-setter-return.js b/node_modules/eslint/lib/rules/no-setter-return.js index 25e8f1428..a43637e7b 100644 --- a/node_modules/eslint/lib/rules/no-setter-return.js +++ b/node_modules/eslint/lib/rules/no-setter-return.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { findVariable } = require("eslint-utils"); +const { findVariable } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Helpers diff --git a/node_modules/eslint/lib/rules/no-useless-backreference.js b/node_modules/eslint/lib/rules/no-useless-backreference.js index f23535bc3..5103e098b 100644 --- a/node_modules/eslint/lib/rules/no-useless-backreference.js +++ b/node_modules/eslint/lib/rules/no-useless-backreference.js @@ -9,8 +9,8 @@ // Requirements //------------------------------------------------------------------------------ -const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("eslint-utils"); -const { RegExpParser, visitRegExpAST } = require("regexpp"); +const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("@eslint-community/eslint-utils"); +const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp"); //------------------------------------------------------------------------------ // Helpers diff --git a/node_modules/eslint/lib/rules/no-useless-return.js b/node_modules/eslint/lib/rules/no-useless-return.js index be8d4dfd3..55e34b3ab 100644 --- a/node_modules/eslint/lib/rules/no-useless-return.js +++ b/node_modules/eslint/lib/rules/no-useless-return.js @@ -197,7 +197,7 @@ module.exports = { return { - // Makes and pushs a new scope information. + // Makes and pushes a new scope information. onCodePathStart(codePath) { scopeInfo = { upper: scopeInfo, diff --git a/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js b/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js index fec531972..06459e258 100644 --- a/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +++ b/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { CALL, ReferenceTracker } = require("eslint-utils"); +const { CALL, ReferenceTracker } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Helpers diff --git a/node_modules/eslint/lib/rules/prefer-named-capture-group.js b/node_modules/eslint/lib/rules/prefer-named-capture-group.js index 66259fc7b..b7055f3a4 100644 --- a/node_modules/eslint/lib/rules/prefer-named-capture-group.js +++ b/node_modules/eslint/lib/rules/prefer-named-capture-group.js @@ -14,8 +14,8 @@ const { CONSTRUCT, ReferenceTracker, getStringIfConstant -} = require("eslint-utils"); -const regexpp = require("regexpp"); +} = require("@eslint-community/eslint-utils"); +const regexpp = require("@eslint-community/regexpp"); //------------------------------------------------------------------------------ // Helpers diff --git a/node_modules/eslint/lib/rules/prefer-object-spread.js b/node_modules/eslint/lib/rules/prefer-object-spread.js index 7d8f7857b..b70ef64bd 100644 --- a/node_modules/eslint/lib/rules/prefer-object-spread.js +++ b/node_modules/eslint/lib/rules/prefer-object-spread.js @@ -6,7 +6,7 @@ "use strict"; -const { CALL, ReferenceTracker } = require("eslint-utils"); +const { CALL, ReferenceTracker } = require("@eslint-community/eslint-utils"); const { isCommaToken, isOpeningParenToken, diff --git a/node_modules/eslint/lib/rules/prefer-regex-literals.js b/node_modules/eslint/lib/rules/prefer-regex-literals.js index fdf18874e..c9948658c 100644 --- a/node_modules/eslint/lib/rules/prefer-regex-literals.js +++ b/node_modules/eslint/lib/rules/prefer-regex-literals.js @@ -10,8 +10,8 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { CALL, CONSTRUCT, ReferenceTracker, findVariable } = require("eslint-utils"); -const { RegExpValidator, visitRegExpAST, RegExpParser } = require("regexpp"); +const { CALL, CONSTRUCT, ReferenceTracker, findVariable } = require("@eslint-community/eslint-utils"); +const { RegExpValidator, visitRegExpAST, RegExpParser } = require("@eslint-community/regexpp"); const { canTokensBeAdjacent } = require("./utils/ast-utils"); //------------------------------------------------------------------------------ diff --git a/node_modules/eslint/lib/rules/require-unicode-regexp.js b/node_modules/eslint/lib/rules/require-unicode-regexp.js index 4236af6db..efac2519f 100644 --- a/node_modules/eslint/lib/rules/require-unicode-regexp.js +++ b/node_modules/eslint/lib/rules/require-unicode-regexp.js @@ -14,7 +14,7 @@ const { CONSTRUCT, ReferenceTracker, getStringIfConstant -} = require("eslint-utils"); +} = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Rule Definition diff --git a/node_modules/eslint/lib/rules/wrap-iife.js b/node_modules/eslint/lib/rules/wrap-iife.js index 4c2c9275d..66ea3f8fa 100644 --- a/node_modules/eslint/lib/rules/wrap-iife.js +++ b/node_modules/eslint/lib/rules/wrap-iife.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const eslintUtils = require("eslint-utils"); +const eslintUtils = require("@eslint-community/eslint-utils"); //---------------------------------------------------------------------- // Helpers diff --git a/node_modules/eslint/lib/source-code/source-code.js b/node_modules/eslint/lib/source-code/source-code.js index 49b2820a8..9e2b68e2d 100644 --- a/node_modules/eslint/lib/source-code/source-code.js +++ b/node_modules/eslint/lib/source-code/source-code.js @@ -9,7 +9,7 @@ //------------------------------------------------------------------------------ const - { isCommentToken } = require("eslint-utils"), + { isCommentToken } = require("@eslint-community/eslint-utils"), TokenStore = require("./token-store"), astUtils = require("../shared/ast-utils"), Traverser = require("../shared/traverser"); diff --git a/node_modules/eslint/lib/source-code/token-store/index.js b/node_modules/eslint/lib/source-code/token-store/index.js index 25db8a4f4..46a96b2f4 100644 --- a/node_modules/eslint/lib/source-code/token-store/index.js +++ b/node_modules/eslint/lib/source-code/token-store/index.js @@ -9,7 +9,7 @@ //------------------------------------------------------------------------------ const assert = require("assert"); -const { isCommentToken } = require("eslint-utils"); +const { isCommentToken } = require("@eslint-community/eslint-utils"); const cursors = require("./cursors"); const ForwardTokenCursor = require("./forward-token-cursor"); const PaddedTokenCursor = require("./padded-token-cursor"); diff --git a/node_modules/eslint/messages/no-config-found.js b/node_modules/eslint/messages/no-config-found.js index 9860410a6..21cf549eb 100644 --- a/node_modules/eslint/messages/no-config-found.js +++ b/node_modules/eslint/messages/no-config-found.js @@ -10,6 +10,6 @@ ESLint couldn't find a configuration file. To set up a configuration file for th ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory. -If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://eslint.org/chat/help +If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat `.trimStart(); }; diff --git a/node_modules/eslint/package.json b/node_modules/eslint/package.json index 1cd7ea195..c8c7f5fbb 100644 --- a/node_modules/eslint/package.json +++ b/node_modules/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "8.32.0", + "version": "8.36.0", "author": "Nicholas C. Zakas ", "description": "An AST-based pattern checker for JavaScript.", "bin": { @@ -37,6 +37,10 @@ "lint-staged": { "*.js": "eslint --fix", "*.md": "markdownlint --fix", + "lib/rules/*.js": [ + "node tools/update-eslint-all.js", + "git add packages/js/src/configs/eslint-all.js" + ], "docs/src/rules/*.md": [ "node tools/fetch-docs-links.js", "git add docs/src/_data/further_reading_links.json" @@ -56,7 +60,10 @@ "homepage": "https://eslint.org", "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { - "@eslint/eslintrc": "^1.4.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -67,10 +74,9 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -91,7 +97,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" diff --git a/node_modules/espree/dist/espree.cjs b/node_modules/espree/dist/espree.cjs index 352d595e7..9ace5376c 100644 --- a/node_modules/espree/dist/espree.cjs +++ b/node_modules/espree/dist/espree.cjs @@ -760,7 +760,7 @@ var espree = () => Parser => { }; }; -const version$1 = "9.4.1"; +const version$1 = "9.5.0"; /** * @fileoverview Main Espree file that converts Acorn into Esprima output. @@ -895,6 +895,7 @@ function parse(code, options) { //------------------------------------------------------------------------------ const version = version$1; +const name = "espree"; /* istanbul ignore next */ const VisitorKeys = (function() { @@ -904,16 +905,16 @@ const VisitorKeys = (function() { // Derive node types from VisitorKeys /* istanbul ignore next */ const Syntax = (function() { - let name, + let key, types = {}; if (typeof Object.create === "function") { types = Object.create(null); } - for (name in VisitorKeys) { - if (Object.hasOwnProperty.call(VisitorKeys, name)) { - types[name] = name; + for (key in VisitorKeys) { + if (Object.hasOwnProperty.call(VisitorKeys, key)) { + types[key] = key; } } @@ -931,6 +932,7 @@ const supportedEcmaVersions = getSupportedEcmaVersions(); exports.Syntax = Syntax; exports.VisitorKeys = VisitorKeys; exports.latestEcmaVersion = latestEcmaVersion; +exports.name = name; exports.parse = parse; exports.supportedEcmaVersions = supportedEcmaVersions; exports.tokenize = tokenize; diff --git a/node_modules/espree/espree.js b/node_modules/espree/espree.js index 71e3d47d5..97bda4bd1 100644 --- a/node_modules/espree/espree.js +++ b/node_modules/espree/espree.js @@ -139,6 +139,7 @@ export function parse(code, options) { //------------------------------------------------------------------------------ export const version = espreeVersion; +export const name = "espree"; /* istanbul ignore next */ export const VisitorKeys = (function() { @@ -148,16 +149,16 @@ export const VisitorKeys = (function() { // Derive node types from VisitorKeys /* istanbul ignore next */ export const Syntax = (function() { - let name, + let key, types = {}; if (typeof Object.create === "function") { types = Object.create(null); } - for (name in VisitorKeys) { - if (Object.hasOwnProperty.call(VisitorKeys, name)) { - types[name] = name; + for (key in VisitorKeys) { + if (Object.hasOwnProperty.call(VisitorKeys, key)) { + types[key] = key; } } diff --git a/node_modules/espree/lib/version.js b/node_modules/espree/lib/version.js index 2175f85a5..597a13f17 100644 --- a/node_modules/espree/lib/version.js +++ b/node_modules/espree/lib/version.js @@ -1,3 +1,3 @@ -const version = "9.4.1"; +const version = "9.5.0"; export default version; diff --git a/node_modules/espree/package.json b/node_modules/espree/package.json index 8f2b06c16..c64e48743 100644 --- a/node_modules/espree/package.json +++ b/node_modules/espree/package.json @@ -16,7 +16,7 @@ ], "./package.json": "./package.json" }, - "version": "9.4.1", + "version": "9.5.0", "files": [ "lib", "dist/espree.cjs", diff --git a/node_modules/esquery/dist/esquery.esm.js b/node_modules/esquery/dist/esquery.esm.js index 7a62b8b39..40a9f4928 100644 --- a/node_modules/esquery/dist/esquery.esm.js +++ b/node_modules/esquery/dist/esquery.esm.js @@ -1,66 +1,54 @@ +function _iterableToArrayLimit(arr, i) { + var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; + if (null != _i) { + var _s, + _e, + _x, + _r, + _arr = [], + _n = !0, + _d = !1; + try { + if (_x = (_i = _i.call(arr)).next, 0 === i) { + if (Object(_i) !== _i) return; + _n = !1; + } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); + } catch (err) { + _d = !0, _e = err; + } finally { + try { + if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + } finally { + if (_d) throw _e; + } + } + return _arr; + } +} function _typeof(obj) { "@babel/helpers - typeof"; - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); } - function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); -} - -function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); @@ -69,80 +57,18 @@ function _unsupportedIterableToArray(o, minLen) { if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; } - function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; -} - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { @@ -174,25 +100,19 @@ var estraverse = createCommonjsModule(function (module, exports) { (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /*jslint vars:false, bitwise:true*/ - /*jshint indent:4*/ - /*global exports:true*/ (function clone(exports) { var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE; - function deepCopy(obj) { var ret = {}, - key, - val; - + key, + val; for (key in obj) { if (obj.hasOwnProperty(key)) { val = obj[key]; - if (typeof val === 'object' && val !== null) { ret[key] = deepCopy(val); } else { @@ -200,21 +120,19 @@ var estraverse = createCommonjsModule(function (module, exports) { } } } - return ret; - } // based on LLVM libc++ upper_bound / lower_bound - // MIT License + } + // based on LLVM libc++ upper_bound / lower_bound + // MIT License function upperBound(array, func) { var diff, len, i, current; len = array.length; i = 0; - while (len) { diff = len >>> 1; current = i + diff; - if (func(array[current])) { len = diff; } else { @@ -222,10 +140,8 @@ var estraverse = createCommonjsModule(function (module, exports) { len -= diff + 1; } } - return i; } - Syntax = { AssignmentExpression: 'AssignmentExpression', AssignmentPattern: 'AssignmentPattern', @@ -282,8 +198,10 @@ var estraverse = createCommonjsModule(function (module, exports) { NewExpression: 'NewExpression', ObjectExpression: 'ObjectExpression', ObjectPattern: 'ObjectPattern', + PrivateIdentifier: 'PrivateIdentifier', Program: 'Program', Property: 'Property', + PropertyDefinition: 'PropertyDefinition', RestElement: 'RestElement', ReturnStatement: 'ReturnStatement', SequenceExpression: 'SequenceExpression', @@ -361,8 +279,10 @@ var estraverse = createCommonjsModule(function (module, exports) { NewExpression: ['callee', 'arguments'], ObjectExpression: ['properties'], ObjectPattern: ['properties'], + PrivateIdentifier: [], Program: ['body'], Property: ['key', 'value'], + PropertyDefinition: ['key', 'value'], RestElement: ['argument'], ReturnStatement: ['argument'], SequenceExpression: ['expressions'], @@ -383,8 +303,9 @@ var estraverse = createCommonjsModule(function (module, exports) { WhileStatement: ['test', 'body'], WithStatement: ['object', 'body'], YieldExpression: ['argument'] - }; // unique id + }; + // unique id BREAK = {}; SKIP = {}; REMOVE = {}; @@ -393,16 +314,13 @@ var estraverse = createCommonjsModule(function (module, exports) { Skip: SKIP, Remove: REMOVE }; - function Reference(parent, key) { this.parent = parent; this.key = key; } - Reference.prototype.replace = function replace(node) { this.parent[this.key] = node; }; - Reference.prototype.remove = function remove() { if (Array.isArray(this.parent)) { this.parent.splice(this.key, 1); @@ -412,21 +330,18 @@ var estraverse = createCommonjsModule(function (module, exports) { return false; } }; - function Element(node, path, wrap, ref) { this.node = node; this.path = path; this.wrap = wrap; this.ref = ref; } + function Controller() {} - function Controller() {} // API: + // API: // return property path array from root to current node - - Controller.prototype.path = function path() { var i, iz, j, jz, result, element; - function addToPath(result, path) { if (Array.isArray(path)) { for (j = 0, jz = path.length; j < jz; ++j) { @@ -435,91 +350,84 @@ var estraverse = createCommonjsModule(function (module, exports) { } else { result.push(path); } - } // root node - + } + // root node if (!this.__current.path) { return null; - } // first node is sentinel, second node is root element - + } + // first node is sentinel, second node is root element result = []; - for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { element = this.__leavelist[i]; addToPath(result, element.path); } - addToPath(result, this.__current.path); return result; - }; // API: - // return type of current node - + }; + // API: + // return type of current node Controller.prototype.type = function () { var node = this.current(); return node.type || this.__current.wrap; - }; // API: - // return array of parent elements - + }; + // API: + // return array of parent elements Controller.prototype.parents = function parents() { - var i, iz, result; // first node is sentinel + var i, iz, result; + // first node is sentinel result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { result.push(this.__leavelist[i].node); } - return result; - }; // API: - // return current node - + }; + // API: + // return current node Controller.prototype.current = function current() { return this.__current.node; }; - Controller.prototype.__execute = function __execute(callback, element) { var previous, result; result = undefined; previous = this.__current; this.__current = element; this.__state = null; - if (callback) { result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); } - this.__current = previous; return result; - }; // API: - // notify control skip / break - + }; + // API: + // notify control skip / break Controller.prototype.notify = function notify(flag) { this.__state = flag; - }; // API: - // skip child nodes of current node - + }; + // API: + // skip child nodes of current node Controller.prototype.skip = function () { this.notify(SKIP); - }; // API: - // break traversals - + }; + // API: + // break traversals Controller.prototype['break'] = function () { this.notify(BREAK); - }; // API: - // remove node - + }; + // API: + // remove node Controller.prototype.remove = function () { this.notify(REMOVE); }; - Controller.prototype.__initialize = function (root, visitor) { this.visitor = visitor; this.root = root; @@ -528,87 +436,68 @@ var estraverse = createCommonjsModule(function (module, exports) { this.__current = null; this.__state = null; this.__fallback = null; - if (visitor.fallback === 'iteration') { this.__fallback = Object.keys; } else if (typeof visitor.fallback === 'function') { this.__fallback = visitor.fallback; } - this.__keys = VisitorKeys; - if (visitor.keys) { this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); } }; - function isNode(node) { if (node == null) { return false; } - return typeof node === 'object' && typeof node.type === 'string'; } - function isProperty(nodeType, key) { return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; } - function candidateExistsInLeaveList(leavelist, candidate) { for (var i = leavelist.length - 1; i >= 0; --i) { if (leavelist[i].node === candidate) { return true; } } - return false; } - Controller.prototype.traverse = function traverse(root, visitor) { var worklist, leavelist, element, node, nodeType, ret, key, current, current2, candidates, candidate, sentinel; - this.__initialize(root, visitor); + sentinel = {}; - sentinel = {}; // reference - + // reference worklist = this.__worklist; - leavelist = this.__leavelist; // initialize + leavelist = this.__leavelist; + // initialize worklist.push(new Element(root, null, null, null)); leavelist.push(new Element(null, null, null, null)); - while (worklist.length) { element = worklist.pop(); - if (element === sentinel) { element = leavelist.pop(); ret = this.__execute(visitor.leave, element); - if (this.__state === BREAK || ret === BREAK) { return; } - continue; } - if (element.node) { ret = this.__execute(visitor.enter, element); - if (this.__state === BREAK || ret === BREAK) { return; } - worklist.push(sentinel); leavelist.push(element); - if (this.__state === SKIP || ret === SKIP) { continue; } - node = element.node; nodeType = node.type || element.wrap; candidates = this.__keys[nodeType]; - if (!candidates) { if (this.__fallback) { candidates = this.__fallback(node); @@ -616,29 +505,22 @@ var estraverse = createCommonjsModule(function (module, exports) { throw new Error('Unknown node type ' + nodeType + '.'); } } - current = candidates.length; - while ((current -= 1) >= 0) { key = candidates[current]; candidate = node[key]; - if (!candidate) { continue; } - if (Array.isArray(candidate)) { current2 = candidate.length; - while ((current2 -= 1) >= 0) { if (!candidate[current2]) { continue; } - if (candidateExistsInLeaveList(leavelist, candidate[current2])) { continue; } - if (isProperty(nodeType, candidates[current])) { element = new Element(candidate[current2], [key, current2], 'Property', null); } else if (isNode(candidate[current2])) { @@ -646,121 +528,103 @@ var estraverse = createCommonjsModule(function (module, exports) { } else { continue; } - worklist.push(element); } } else if (isNode(candidate)) { if (candidateExistsInLeaveList(leavelist, candidate)) { continue; } - worklist.push(new Element(candidate, key, null, null)); } } } } }; - Controller.prototype.replace = function replace(root, visitor) { var worklist, leavelist, node, nodeType, target, element, current, current2, candidates, candidate, sentinel, outer, key; - function removeElem(element) { var i, key, nextElem, parent; - if (element.ref.remove()) { // When the reference is an element of an array. key = element.ref.key; - parent = element.ref.parent; // If removed from array, then decrease following items' keys. + parent = element.ref.parent; + // If removed from array, then decrease following items' keys. i = worklist.length; - while (i--) { nextElem = worklist[i]; - if (nextElem.ref && nextElem.ref.parent === parent) { if (nextElem.ref.key < key) { break; } - --nextElem.ref.key; } } } } - this.__initialize(root, visitor); + sentinel = {}; - sentinel = {}; // reference - + // reference worklist = this.__worklist; - leavelist = this.__leavelist; // initialize + leavelist = this.__leavelist; + // initialize outer = { root: root }; element = new Element(root, null, null, new Reference(outer, 'root')); worklist.push(element); leavelist.push(element); - while (worklist.length) { element = worklist.pop(); - if (element === sentinel) { element = leavelist.pop(); - target = this.__execute(visitor.leave, element); // node may be replaced with null, - // so distinguish between undefined and null in this place + target = this.__execute(visitor.leave, element); + // node may be replaced with null, + // so distinguish between undefined and null in this place if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { // replace element.ref.replace(target); } - if (this.__state === REMOVE || target === REMOVE) { removeElem(element); } - if (this.__state === BREAK || target === BREAK) { return outer.root; } - continue; } + target = this.__execute(visitor.enter, element); - target = this.__execute(visitor.enter, element); // node may be replaced with null, + // node may be replaced with null, // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { // replace element.ref.replace(target); element.node = target; } - if (this.__state === REMOVE || target === REMOVE) { removeElem(element); element.node = null; } - if (this.__state === BREAK || target === BREAK) { return outer.root; - } // node may be null - + } + // node may be null node = element.node; - if (!node) { continue; } - worklist.push(sentinel); leavelist.push(element); - if (this.__state === SKIP || target === SKIP) { continue; } - nodeType = node.type || element.wrap; candidates = this.__keys[nodeType]; - if (!candidates) { if (this.__fallback) { candidates = this.__fallback(node); @@ -768,25 +632,19 @@ var estraverse = createCommonjsModule(function (module, exports) { throw new Error('Unknown node type ' + nodeType + '.'); } } - current = candidates.length; - while ((current -= 1) >= 0) { key = candidates[current]; candidate = node[key]; - if (!candidate) { continue; } - if (Array.isArray(candidate)) { current2 = candidate.length; - while ((current2 -= 1) >= 0) { if (!candidate[current2]) { continue; } - if (isProperty(nodeType, candidates[current])) { element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); } else if (isNode(candidate[current2])) { @@ -794,7 +652,6 @@ var estraverse = createCommonjsModule(function (module, exports) { } else { continue; } - worklist.push(element); } } else if (isNode(candidate)) { @@ -802,53 +659,43 @@ var estraverse = createCommonjsModule(function (module, exports) { } } } - return outer.root; }; - function traverse(root, visitor) { var controller = new Controller(); return controller.traverse(root, visitor); } - function replace(root, visitor) { var controller = new Controller(); return controller.replace(root, visitor); } - function extendCommentRange(comment, tokens) { var target; target = upperBound(tokens, function search(token) { return token.range[0] > comment.range[0]; }); comment.extendedRange = [comment.range[0], comment.range[1]]; - if (target !== tokens.length) { comment.extendedRange[1] = tokens[target].range[0]; } - target -= 1; - if (target >= 0) { comment.extendedRange[0] = tokens[target].range[1]; } - return comment; } - function attachComments(tree, providedComments, tokens) { // At first, we should calculate extended comment ranges. var comments = [], - comment, - len, - i, - cursor; - + comment, + len, + i, + cursor; if (!tree.range) { throw new Error('attachComments needs range information'); - } // tokens array is empty, we attach comments to tree as 'leadingComments' - + } + // tokens array is empty, we attach comments to tree as 'leadingComments' if (!tokens.length) { if (providedComments.length) { for (i = 0, len = providedComments.length; i < len; i += 1) { @@ -856,47 +703,39 @@ var estraverse = createCommonjsModule(function (module, exports) { comment.extendedRange = [0, tree.range[0]]; comments.push(comment); } - tree.leadingComments = comments; } - return tree; } - for (i = 0, len = providedComments.length; i < len; i += 1) { comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } // This is based on John Freeman's implementation. - + } + // This is based on John Freeman's implementation. cursor = 0; traverse(tree, { enter: function (node) { var comment; - while (cursor < comments.length) { comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { break; } - if (comment.extendedRange[1] === node.range[0]) { if (!node.leadingComments) { node.leadingComments = []; } - node.leadingComments.push(comment); comments.splice(cursor, 1); } else { cursor += 1; } - } // already out of owned node - + } + // already out of owned node if (cursor === comments.length) { return VisitorOption.Break; } - if (comments[cursor].extendedRange[0] > node.range[1]) { return VisitorOption.Skip; } @@ -906,31 +745,26 @@ var estraverse = createCommonjsModule(function (module, exports) { traverse(tree, { leave: function (node) { var comment; - while (cursor < comments.length) { comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { break; } - if (node.range[1] === comment.extendedRange[0]) { if (!node.trailingComments) { node.trailingComments = []; } - node.trailingComments.push(comment); comments.splice(cursor, 1); } else { cursor += 1; } - } // already out of owned node - + } + // already out of owned node if (cursor === comments.length) { return VisitorOption.Break; } - if (comments[cursor].extendedRange[0] > node.range[1]) { return VisitorOption.Skip; } @@ -938,7 +772,6 @@ var estraverse = createCommonjsModule(function (module, exports) { }); return tree; } - exports.Syntax = Syntax; exports.traverse = traverse; exports.replace = replace; @@ -946,15 +779,12 @@ var estraverse = createCommonjsModule(function (module, exports) { exports.VisitorKeys = VisitorKeys; exports.VisitorOption = VisitorOption; exports.Controller = Controller; - exports.cloneEnvironment = function () { return clone({}); }; - return exports; })(exports); /* vim: set sw=4 ts=4 et tw=80 : */ - }); var parser = createCommonjsModule(function (module) { @@ -973,25 +803,20 @@ var parser = createCommonjsModule(function (module) { function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; child.prototype = new ctor(); } - function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; - if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } - peg$subclass(peg$SyntaxError, Error); - peg$SyntaxError.buildMessage = function (expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function literal(expectation) { @@ -999,12 +824,10 @@ var parser = createCommonjsModule(function (module) { }, "class": function _class(expectation) { var escapedParts = "", - i; - + i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } - return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function any(expectation) { @@ -1017,11 +840,9 @@ var parser = createCommonjsModule(function (module) { return expectation.description; } }; - function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } - function literalEscape(s) { return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); @@ -1029,7 +850,6 @@ var parser = createCommonjsModule(function (module) { return '\\x' + hex(ch); }); } - function classEscape(s) { return s.replace(/\\/g, '\\\\').replace(/\]/g, '\\]').replace(/\^/g, '\\^').replace(/-/g, '\\-').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); @@ -1037,22 +857,17 @@ var parser = createCommonjsModule(function (module) { return '\\x' + hex(ch); }); } - function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } - function describeExpected(expected) { var descriptions = new Array(expected.length), - i, - j; - + i, + j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } - descriptions.sort(); - if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { @@ -1060,296 +875,275 @@ var parser = createCommonjsModule(function (module) { j++; } } - descriptions.length = j; } - switch (descriptions.length) { case 1: return descriptions[0]; - case 2: return descriptions[0] + " or " + descriptions[1]; - default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } - function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; - function peg$parse(input, options) { options = options !== void 0 ? options : {}; - var peg$FAILED = {}, - peg$startRuleFunctions = { - start: peg$parsestart - }, - peg$startRuleFunction = peg$parsestart, - peg$c0 = function peg$c0(ss) { - return ss.length === 1 ? ss[0] : { - type: 'matches', - selectors: ss - }; - }, - peg$c1 = function peg$c1() { - return void 0; - }, - peg$c2 = " ", - peg$c3 = peg$literalExpectation(" ", false), - peg$c4 = /^[^ [\],():#!=><~+.]/, - peg$c5 = peg$classExpectation([" ", "[", "]", ",", "(", ")", ":", "#", "!", "=", ">", "<", "~", "+", "."], true, false), - peg$c6 = function peg$c6(i) { - return i.join(''); - }, - peg$c7 = ">", - peg$c8 = peg$literalExpectation(">", false), - peg$c9 = function peg$c9() { - return 'child'; - }, - peg$c10 = "~", - peg$c11 = peg$literalExpectation("~", false), - peg$c12 = function peg$c12() { - return 'sibling'; - }, - peg$c13 = "+", - peg$c14 = peg$literalExpectation("+", false), - peg$c15 = function peg$c15() { - return 'adjacent'; - }, - peg$c16 = function peg$c16() { - return 'descendant'; - }, - peg$c17 = ",", - peg$c18 = peg$literalExpectation(",", false), - peg$c19 = function peg$c19(s, ss) { - return [s].concat(ss.map(function (s) { - return s[3]; - })); - }, - peg$c20 = function peg$c20(a, ops) { - return ops.reduce(function (memo, rhs) { - return { - type: rhs[0], - left: memo, - right: rhs[1] + peg$startRuleFunctions = { + start: peg$parsestart + }, + peg$startRuleFunction = peg$parsestart, + peg$c0 = function peg$c0(ss) { + return ss.length === 1 ? ss[0] : { + type: 'matches', + selectors: ss }; - }, a); - }, - peg$c21 = "!", - peg$c22 = peg$literalExpectation("!", false), - peg$c23 = function peg$c23(subject, as) { - var b = as.length === 1 ? as[0] : { - type: 'compound', - selectors: as - }; - if (subject) b.subject = true; - return b; - }, - peg$c24 = "*", - peg$c25 = peg$literalExpectation("*", false), - peg$c26 = function peg$c26(a) { - return { - type: 'wildcard', - value: a - }; - }, - peg$c27 = "#", - peg$c28 = peg$literalExpectation("#", false), - peg$c29 = function peg$c29(i) { - return { - type: 'identifier', - value: i - }; - }, - peg$c30 = "[", - peg$c31 = peg$literalExpectation("[", false), - peg$c32 = "]", - peg$c33 = peg$literalExpectation("]", false), - peg$c34 = function peg$c34(v) { - return v; - }, - peg$c35 = /^[>", "<", "!"], false, false), - peg$c37 = "=", - peg$c38 = peg$literalExpectation("=", false), - peg$c39 = function peg$c39(a) { - return (a || '') + '='; - }, - peg$c40 = /^[><]/, - peg$c41 = peg$classExpectation([">", "<"], false, false), - peg$c42 = ".", - peg$c43 = peg$literalExpectation(".", false), - peg$c44 = function peg$c44(a, as) { - return [].concat.apply([a], as).join(''); - }, - peg$c45 = function peg$c45(name, op, value) { - return { - type: 'attribute', - name: name, - operator: op, - value: value - }; - }, - peg$c46 = function peg$c46(name) { - return { - type: 'attribute', - name: name - }; - }, - peg$c47 = "\"", - peg$c48 = peg$literalExpectation("\"", false), - peg$c49 = /^[^\\"]/, - peg$c50 = peg$classExpectation(["\\", "\""], true, false), - peg$c51 = "\\", - peg$c52 = peg$literalExpectation("\\", false), - peg$c53 = peg$anyExpectation(), - peg$c54 = function peg$c54(a, b) { - return a + b; - }, - peg$c55 = function peg$c55(d) { - return { - type: 'literal', - value: strUnescape(d.join('')) - }; - }, - peg$c56 = "'", - peg$c57 = peg$literalExpectation("'", false), - peg$c58 = /^[^\\']/, - peg$c59 = peg$classExpectation(["\\", "'"], true, false), - peg$c60 = /^[0-9]/, - peg$c61 = peg$classExpectation([["0", "9"]], false, false), - peg$c62 = function peg$c62(a, b) { - // Can use `a.flat().join('')` once supported - var leadingDecimals = a ? [].concat.apply([], a).join('') : ''; - return { - type: 'literal', - value: parseFloat(leadingDecimals + b.join('')) - }; - }, - peg$c63 = function peg$c63(i) { - return { - type: 'literal', - value: i - }; - }, - peg$c64 = "type(", - peg$c65 = peg$literalExpectation("type(", false), - peg$c66 = /^[^ )]/, - peg$c67 = peg$classExpectation([" ", ")"], true, false), - peg$c68 = ")", - peg$c69 = peg$literalExpectation(")", false), - peg$c70 = function peg$c70(t) { - return { - type: 'type', - value: t.join('') - }; - }, - peg$c71 = /^[imsu]/, - peg$c72 = peg$classExpectation(["i", "m", "s", "u"], false, false), - peg$c73 = "/", - peg$c74 = peg$literalExpectation("/", false), - peg$c75 = /^[^\/]/, - peg$c76 = peg$classExpectation(["/"], true, false), - peg$c77 = function peg$c77(d, flgs) { - return { - type: 'regexp', - value: new RegExp(d.join(''), flgs ? flgs.join('') : '') - }; - }, - peg$c78 = function peg$c78(i, is) { - return { - type: 'field', - name: is.reduce(function (memo, p) { - return memo + p[0] + p[1]; - }, i) - }; - }, - peg$c79 = ":not(", - peg$c80 = peg$literalExpectation(":not(", false), - peg$c81 = function peg$c81(ss) { - return { - type: 'not', - selectors: ss - }; - }, - peg$c82 = ":matches(", - peg$c83 = peg$literalExpectation(":matches(", false), - peg$c84 = function peg$c84(ss) { - return { - type: 'matches', - selectors: ss - }; - }, - peg$c85 = ":has(", - peg$c86 = peg$literalExpectation(":has(", false), - peg$c87 = function peg$c87(ss) { - return { - type: 'has', - selectors: ss - }; - }, - peg$c88 = ":first-child", - peg$c89 = peg$literalExpectation(":first-child", false), - peg$c90 = function peg$c90() { - return nth(1); - }, - peg$c91 = ":last-child", - peg$c92 = peg$literalExpectation(":last-child", false), - peg$c93 = function peg$c93() { - return nthLast(1); - }, - peg$c94 = ":nth-child(", - peg$c95 = peg$literalExpectation(":nth-child(", false), - peg$c96 = function peg$c96(n) { - return nth(parseInt(n.join(''), 10)); - }, - peg$c97 = ":nth-last-child(", - peg$c98 = peg$literalExpectation(":nth-last-child(", false), - peg$c99 = function peg$c99(n) { - return nthLast(parseInt(n.join(''), 10)); - }, - peg$c100 = ":", - peg$c101 = peg$literalExpectation(":", false), - peg$c102 = "statement", - peg$c103 = peg$literalExpectation("statement", true), - peg$c104 = "expression", - peg$c105 = peg$literalExpectation("expression", true), - peg$c106 = "declaration", - peg$c107 = peg$literalExpectation("declaration", true), - peg$c108 = "function", - peg$c109 = peg$literalExpectation("function", true), - peg$c110 = "pattern", - peg$c111 = peg$literalExpectation("pattern", true), - peg$c112 = function peg$c112(c) { - return { - type: 'class', - name: c - }; - }, - peg$currPos = 0, - peg$posDetailsCache = [{ - line: 1, - column: 1 - }], - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$resultsCache = {}, - peg$result; - + }, + peg$c1 = function peg$c1() { + return void 0; + }, + peg$c2 = " ", + peg$c3 = peg$literalExpectation(" ", false), + peg$c4 = /^[^ [\],():#!=><~+.]/, + peg$c5 = peg$classExpectation([" ", "[", "]", ",", "(", ")", ":", "#", "!", "=", ">", "<", "~", "+", "."], true, false), + peg$c6 = function peg$c6(i) { + return i.join(''); + }, + peg$c7 = ">", + peg$c8 = peg$literalExpectation(">", false), + peg$c9 = function peg$c9() { + return 'child'; + }, + peg$c10 = "~", + peg$c11 = peg$literalExpectation("~", false), + peg$c12 = function peg$c12() { + return 'sibling'; + }, + peg$c13 = "+", + peg$c14 = peg$literalExpectation("+", false), + peg$c15 = function peg$c15() { + return 'adjacent'; + }, + peg$c16 = function peg$c16() { + return 'descendant'; + }, + peg$c17 = ",", + peg$c18 = peg$literalExpectation(",", false), + peg$c19 = function peg$c19(s, ss) { + return [s].concat(ss.map(function (s) { + return s[3]; + })); + }, + peg$c20 = function peg$c20(a, ops) { + return ops.reduce(function (memo, rhs) { + return { + type: rhs[0], + left: memo, + right: rhs[1] + }; + }, a); + }, + peg$c21 = "!", + peg$c22 = peg$literalExpectation("!", false), + peg$c23 = function peg$c23(subject, as) { + var b = as.length === 1 ? as[0] : { + type: 'compound', + selectors: as + }; + if (subject) b.subject = true; + return b; + }, + peg$c24 = "*", + peg$c25 = peg$literalExpectation("*", false), + peg$c26 = function peg$c26(a) { + return { + type: 'wildcard', + value: a + }; + }, + peg$c27 = "#", + peg$c28 = peg$literalExpectation("#", false), + peg$c29 = function peg$c29(i) { + return { + type: 'identifier', + value: i + }; + }, + peg$c30 = "[", + peg$c31 = peg$literalExpectation("[", false), + peg$c32 = "]", + peg$c33 = peg$literalExpectation("]", false), + peg$c34 = function peg$c34(v) { + return v; + }, + peg$c35 = /^[>", "<", "!"], false, false), + peg$c37 = "=", + peg$c38 = peg$literalExpectation("=", false), + peg$c39 = function peg$c39(a) { + return (a || '') + '='; + }, + peg$c40 = /^[><]/, + peg$c41 = peg$classExpectation([">", "<"], false, false), + peg$c42 = ".", + peg$c43 = peg$literalExpectation(".", false), + peg$c44 = function peg$c44(a, as) { + return [].concat.apply([a], as).join(''); + }, + peg$c45 = function peg$c45(name, op, value) { + return { + type: 'attribute', + name: name, + operator: op, + value: value + }; + }, + peg$c46 = function peg$c46(name) { + return { + type: 'attribute', + name: name + }; + }, + peg$c47 = "\"", + peg$c48 = peg$literalExpectation("\"", false), + peg$c49 = /^[^\\"]/, + peg$c50 = peg$classExpectation(["\\", "\""], true, false), + peg$c51 = "\\", + peg$c52 = peg$literalExpectation("\\", false), + peg$c53 = peg$anyExpectation(), + peg$c54 = function peg$c54(a, b) { + return a + b; + }, + peg$c55 = function peg$c55(d) { + return { + type: 'literal', + value: strUnescape(d.join('')) + }; + }, + peg$c56 = "'", + peg$c57 = peg$literalExpectation("'", false), + peg$c58 = /^[^\\']/, + peg$c59 = peg$classExpectation(["\\", "'"], true, false), + peg$c60 = /^[0-9]/, + peg$c61 = peg$classExpectation([["0", "9"]], false, false), + peg$c62 = function peg$c62(a, b) { + // Can use `a.flat().join('')` once supported + var leadingDecimals = a ? [].concat.apply([], a).join('') : ''; + return { + type: 'literal', + value: parseFloat(leadingDecimals + b.join('')) + }; + }, + peg$c63 = function peg$c63(i) { + return { + type: 'literal', + value: i + }; + }, + peg$c64 = "type(", + peg$c65 = peg$literalExpectation("type(", false), + peg$c66 = /^[^ )]/, + peg$c67 = peg$classExpectation([" ", ")"], true, false), + peg$c68 = ")", + peg$c69 = peg$literalExpectation(")", false), + peg$c70 = function peg$c70(t) { + return { + type: 'type', + value: t.join('') + }; + }, + peg$c71 = /^[imsu]/, + peg$c72 = peg$classExpectation(["i", "m", "s", "u"], false, false), + peg$c73 = "/", + peg$c74 = peg$literalExpectation("/", false), + peg$c75 = /^[^\/]/, + peg$c76 = peg$classExpectation(["/"], true, false), + peg$c77 = function peg$c77(d, flgs) { + return { + type: 'regexp', + value: new RegExp(d.join(''), flgs ? flgs.join('') : '') + }; + }, + peg$c78 = function peg$c78(i, is) { + return { + type: 'field', + name: is.reduce(function (memo, p) { + return memo + p[0] + p[1]; + }, i) + }; + }, + peg$c79 = ":not(", + peg$c80 = peg$literalExpectation(":not(", false), + peg$c81 = function peg$c81(ss) { + return { + type: 'not', + selectors: ss + }; + }, + peg$c82 = ":matches(", + peg$c83 = peg$literalExpectation(":matches(", false), + peg$c84 = function peg$c84(ss) { + return { + type: 'matches', + selectors: ss + }; + }, + peg$c85 = ":has(", + peg$c86 = peg$literalExpectation(":has(", false), + peg$c87 = function peg$c87(ss) { + return { + type: 'has', + selectors: ss + }; + }, + peg$c88 = ":first-child", + peg$c89 = peg$literalExpectation(":first-child", false), + peg$c90 = function peg$c90() { + return nth(1); + }, + peg$c91 = ":last-child", + peg$c92 = peg$literalExpectation(":last-child", false), + peg$c93 = function peg$c93() { + return nthLast(1); + }, + peg$c94 = ":nth-child(", + peg$c95 = peg$literalExpectation(":nth-child(", false), + peg$c96 = function peg$c96(n) { + return nth(parseInt(n.join(''), 10)); + }, + peg$c97 = ":nth-last-child(", + peg$c98 = peg$literalExpectation(":nth-last-child(", false), + peg$c99 = function peg$c99(n) { + return nthLast(parseInt(n.join(''), 10)); + }, + peg$c100 = ":", + peg$c101 = peg$literalExpectation(":", false), + peg$c102 = function peg$c102(c) { + return { + type: 'class', + name: c + }; + }, + peg$currPos = 0, + peg$posDetailsCache = [{ + line: 1, + column: 1 + }], + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$resultsCache = {}, + peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } - function peg$literalExpectation(text, ignoreCase) { return { type: "literal", @@ -1357,7 +1151,6 @@ var parser = createCommonjsModule(function (module) { ignoreCase: ignoreCase }; } - function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", @@ -1366,38 +1159,31 @@ var parser = createCommonjsModule(function (module) { ignoreCase: ignoreCase }; } - function peg$anyExpectation() { return { type: "any" }; } - function peg$endExpectation() { return { type: "end" }; } - function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], - p; - + p; if (details) { return details; } else { p = pos - 1; - while (!peg$posDetailsCache[p]) { p--; } - details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; - while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; @@ -1405,18 +1191,15 @@ var parser = createCommonjsModule(function (module) { } else { details.column++; } - p++; } - peg$posDetailsCache[pos] = details; return details; } } - function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), - endPosDetails = peg$computePosDetails(endPos); + endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, @@ -1430,43 +1213,33 @@ var parser = createCommonjsModule(function (module) { } }; } - function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } - if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } - peg$maxFailExpected.push(expected); } - function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); } - function peg$parsestart() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 0, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { s2 = peg$parseselectors(); - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c0(s2); s0 = s1; @@ -1482,104 +1255,83 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { s1 = peg$c1(); } - s0 = s1; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parse_() { var s0, s1; var key = peg$currPos * 30 + 1, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = []; - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } - while (s1 !== peg$FAILED) { s0.push(s1); - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseidentifierName() { var s0, s1, s2; var key = peg$currPos * 30 + 2, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = []; - if (peg$c4.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c5); } } - if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); - if (peg$c4.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c5); } @@ -1588,11 +1340,9 @@ var parser = createCommonjsModule(function (module) { } else { s1 = peg$FAILED; } - if (s1 !== peg$FAILED) { s1 = peg$c6(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -1600,35 +1350,28 @@ var parser = createCommonjsModule(function (module) { }; return s0; } - function peg$parsebinaryOp() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 3, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 62) { s2 = peg$c7; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c8); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c9(); s0 = s1; @@ -1644,26 +1387,21 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 126) { s2 = peg$c10; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c11); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c12(); s0 = s1; @@ -1679,26 +1417,21 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { s2 = peg$c13; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c14); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c15(); s0 = s1; @@ -1714,24 +1447,19 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s1 = peg$c16(); s0 = s1; @@ -1746,50 +1474,40 @@ var parser = createCommonjsModule(function (module) { } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; var key = peg$currPos * 30 + 4, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseselector(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s5 = peg$c17; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c18); } } - if (s5 !== peg$FAILED) { s6 = peg$parse_(); - if (s6 !== peg$FAILED) { s7 = peg$parseselector(); - if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -1809,30 +1527,24 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s5 = peg$c17; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c18); } } - if (s5 !== peg$FAILED) { s6 = peg$parse_(); - if (s6 !== peg$FAILED) { s7 = peg$parseselector(); - if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -1853,7 +1565,6 @@ var parser = createCommonjsModule(function (module) { s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c19(s1, s2); s0 = s1; @@ -1865,35 +1576,28 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseselector() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 5, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parsesequence(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parsebinaryOp(); - if (s4 !== peg$FAILED) { s5 = peg$parsesequence(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1905,15 +1609,12 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parsebinaryOp(); - if (s4 !== peg$FAILED) { s5 = peg$parsesequence(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1926,7 +1627,6 @@ var parser = createCommonjsModule(function (module) { s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c20(s1, s2); s0 = s1; @@ -1938,45 +1638,36 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsesequence() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 6, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 33) { s1 = peg$c21; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c22); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseatom(); - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); @@ -1985,7 +1676,6 @@ var parser = createCommonjsModule(function (module) { } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { s1 = peg$c23(s1, s2); s0 = s1; @@ -1997,56 +1687,41 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseatom() { var s0; var key = peg$currPos * 30 + 7, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$parsewildcard(); - if (s0 === peg$FAILED) { s0 = peg$parseidentifier(); - if (s0 === peg$FAILED) { s0 = peg$parseattr(); - if (s0 === peg$FAILED) { s0 = peg$parsefield(); - if (s0 === peg$FAILED) { s0 = peg$parsenegation(); - if (s0 === peg$FAILED) { s0 = peg$parsematches(); - if (s0 === peg$FAILED) { s0 = peg$parsehas(); - if (s0 === peg$FAILED) { s0 = peg$parsefirstChild(); - if (s0 === peg$FAILED) { s0 = peg$parselastChild(); - if (s0 === peg$FAILED) { s0 = peg$parsenthChild(); - if (s0 === peg$FAILED) { s0 = peg$parsenthLastChild(); - if (s0 === peg$FAILED) { s0 = peg$parseclass(); } @@ -2060,41 +1735,33 @@ var parser = createCommonjsModule(function (module) { } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsewildcard() { var s0, s1; var key = peg$currPos * 30 + 8, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { s1 = peg$c24; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c25); } } - if (s1 !== peg$FAILED) { s1 = peg$c26(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -2102,37 +1769,29 @@ var parser = createCommonjsModule(function (module) { }; return s0; } - function peg$parseidentifier() { var s0, s1, s2; var key = peg$currPos * 30 + 9, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 35) { s1 = peg$c27; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c28); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); - if (s2 !== peg$FAILED) { s1 = peg$c29(s2); s0 = s1; @@ -2144,58 +1803,46 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattr() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 10, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { s1 = peg$c30; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c31); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrValue(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 93) { s5 = peg$c32; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c33); } } - if (s5 !== peg$FAILED) { s1 = peg$c34(s3); s0 = s1; @@ -2219,53 +1866,43 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrOps() { var s0, s1, s2; var key = peg$currPos * 30 + 11, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (peg$c35.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c36); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c37; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c38); } } - if (s2 !== peg$FAILED) { s1 = peg$c39(s1); s0 = s1; @@ -2277,66 +1914,54 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { if (peg$c40.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - { peg$fail(peg$c41); } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrEqOps() { var s0, s1, s2; var key = peg$currPos * 30 + 12, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 33) { s1 = peg$c21; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c22); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c37; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c38); } } - if (s2 !== peg$FAILED) { s1 = peg$c39(s1); s0 = s1; @@ -2348,45 +1973,36 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 13, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseidentifierName(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s4 = peg$c42; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s4 !== peg$FAILED) { s5 = peg$parseidentifierName(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -2398,25 +2014,20 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s4 = peg$c42; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s4 !== peg$FAILED) { s5 = peg$parseidentifierName(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -2429,7 +2040,6 @@ var parser = createCommonjsModule(function (module) { s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c44(s1, s2); s0 = s1; @@ -2441,43 +2051,33 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 14, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrEqOps(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { s5 = peg$parsetype(); - if (s5 === peg$FAILED) { s5 = peg$parseregex(); } - if (s5 !== peg$FAILED) { s1 = peg$c45(s1, s3, s5); s0 = s1; @@ -2501,31 +2101,23 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrOps(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { s5 = peg$parsestring(); - if (s5 === peg$FAILED) { s5 = peg$parsenumber(); - if (s5 === peg$FAILED) { s5 = peg$parsepath(); } } - if (s5 !== peg$FAILED) { s1 = peg$c45(s1, s3, s5); s0 = s1; @@ -2549,89 +2141,71 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s1 = peg$c46(s1); } - s0 = s1; } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsestring() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 15, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c47; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c48); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c49.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c50); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2644,47 +2218,38 @@ var parser = createCommonjsModule(function (module) { s3 = peg$FAILED; } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c49.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c50); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2698,19 +2263,16 @@ var parser = createCommonjsModule(function (module) { } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { s3 = peg$c47; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c48); } } - if (s3 !== peg$FAILED) { s1 = peg$c55(s2); s0 = s1; @@ -2726,61 +2288,49 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 39) { s1 = peg$c56; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c57); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c58.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c59); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2793,47 +2343,38 @@ var parser = createCommonjsModule(function (module) { s3 = peg$FAILED; } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c58.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c59); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2847,19 +2388,16 @@ var parser = createCommonjsModule(function (module) { } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { s3 = peg$c56; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c57); } } - if (s3 !== peg$FAILED) { s1 = peg$c55(s2); s0 = s1; @@ -2876,66 +2414,54 @@ var parser = createCommonjsModule(function (module) { s0 = peg$FAILED; } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenumber() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 16, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$currPos; s2 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { s3 = peg$c42; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s3 !== peg$FAILED) { s2 = [s2, s3]; s1 = s2; @@ -2947,35 +2473,28 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s1; s1 = peg$FAILED; } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } @@ -2984,7 +2503,6 @@ var parser = createCommonjsModule(function (module) { } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { s1 = peg$c62(s1, s2); s0 = s1; @@ -2996,31 +2514,25 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsepath() { var s0, s1; var key = peg$currPos * 30 + 17, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseidentifierName(); - if (s1 !== peg$FAILED) { s1 = peg$c63(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -3028,57 +2540,45 @@ var parser = createCommonjsModule(function (module) { }; return s0; } - function peg$parsetype() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 18, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c64) { s1 = peg$c64; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c65); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c66.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c67); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c66.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c67); } @@ -3087,22 +2587,18 @@ var parser = createCommonjsModule(function (module) { } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c70(s3); s0 = s1; @@ -3126,47 +2622,38 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseflags() { var s0, s1; var key = peg$currPos * 30 + 19, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c72); } } - if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); - if (peg$c71.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c72); } @@ -3175,61 +2662,49 @@ var parser = createCommonjsModule(function (module) { } else { s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseregex() { var s0, s1, s2, s3, s4; var key = peg$currPos * 30 + 20, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 47) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c74); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c75.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c76); } } - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c75.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c76); } @@ -3238,26 +2713,21 @@ var parser = createCommonjsModule(function (module) { } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { s3 = peg$c73; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c74); } } - if (s3 !== peg$FAILED) { s4 = peg$parseflags(); - if (s4 === peg$FAILED) { s4 = null; } - if (s4 !== peg$FAILED) { s1 = peg$c77(s2, s4); s0 = s1; @@ -3277,58 +2747,46 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; var key = peg$currPos * 30 + 21, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s1 = peg$c42; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); - if (s2 !== peg$FAILED) { s3 = []; s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s5 = peg$c42; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s5 !== peg$FAILED) { s6 = peg$parseidentifierName(); - if (s6 !== peg$FAILED) { s5 = [s5, s6]; s4 = s5; @@ -3340,25 +2798,20 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s4; s4 = peg$FAILED; } - while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s5 = peg$c42; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s5 !== peg$FAILED) { s6 = peg$parseidentifierName(); - if (s6 !== peg$FAILED) { s5 = [s5, s6]; s4 = s5; @@ -3371,7 +2824,6 @@ var parser = createCommonjsModule(function (module) { s4 = peg$FAILED; } } - if (s3 !== peg$FAILED) { s1 = peg$c78(s2, s3); s0 = s1; @@ -3387,58 +2839,46 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 22, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c79) { s1 = peg$c79; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c80); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c81(s3); s0 = s1; @@ -3462,58 +2902,46 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsematches() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 23, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c82) { s1 = peg$c82; peg$currPos += 9; } else { s1 = peg$FAILED; - { peg$fail(peg$c83); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c84(s3); s0 = s1; @@ -3537,58 +2965,46 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsehas() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 24, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c85) { s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c86); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c87(s3); s0 = s1; @@ -3612,41 +3028,33 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsefirstChild() { var s0, s1; var key = peg$currPos * 30 + 25, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c88) { s1 = peg$c88; peg$currPos += 12; } else { s1 = peg$FAILED; - { peg$fail(peg$c89); } } - if (s1 !== peg$FAILED) { s1 = peg$c90(); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -3654,34 +3062,27 @@ var parser = createCommonjsModule(function (module) { }; return s0; } - function peg$parselastChild() { var s0, s1; var key = peg$currPos * 30 + 26, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c91) { s1 = peg$c91; peg$currPos += 11; } else { s1 = peg$FAILED; - { peg$fail(peg$c92); } } - if (s1 !== peg$FAILED) { s1 = peg$c93(); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -3689,57 +3090,45 @@ var parser = createCommonjsModule(function (module) { }; return s0; } - function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 27, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c94) { s1 = peg$c94; peg$currPos += 11; } else { s1 = peg$FAILED; - { peg$fail(peg$c95); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } @@ -3748,22 +3137,18 @@ var parser = createCommonjsModule(function (module) { } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c96(s3); s0 = s1; @@ -3787,64 +3172,51 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 28, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c97) { s1 = peg$c97; peg$currPos += 16; } else { s1 = peg$FAILED; - { peg$fail(peg$c98); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } @@ -3853,22 +3225,18 @@ var parser = createCommonjsModule(function (module) { } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c99(s3); s0 = s1; @@ -3892,103 +3260,34 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseclass() { var s0, s1, s2; var key = peg$currPos * 30 + 29, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 58) { s1 = peg$c100; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c101); } } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) { - s2 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c103); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) { - s2 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c105); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) { - s2 = input.substr(peg$currPos, 11); - peg$currPos += 11; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c107); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) { - s2 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c109); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) { - s2 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c111); - } - } - } - } - } - } - + s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { - s1 = peg$c112(s2); + s1 = peg$c102(s2); s0 = s1; } else { peg$currPos = s0; @@ -3998,14 +3297,12 @@ var parser = createCommonjsModule(function (module) { peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function nth(n) { return { type: 'nth-child', @@ -4015,7 +3312,6 @@ var parser = createCommonjsModule(function (module) { } }; } - function nthLast(n) { return { type: 'nth-last-child', @@ -4025,47 +3321,36 @@ var parser = createCommonjsModule(function (module) { } }; } - function strUnescape(s) { return s.replace(/\\(.)/g, function (match, ch) { switch (ch) { case 'b': return '\b'; - case 'f': return '\f'; - case 'n': return '\n'; - case 'r': return '\r'; - case 't': return '\t'; - case 'v': return '\v'; - default: return ch; } }); } - peg$result = peg$startRuleFunction(); - if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } - throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); } } - return { SyntaxError: peg$SyntaxError, parse: peg$parse @@ -4073,20 +3358,13 @@ var parser = createCommonjsModule(function (module) { }); }); -function _objectEntries(obj) { - var entries = []; - var keys = Object.keys(obj); - - for (var k = 0; k < keys.length; k++) entries.push([keys[k], obj[keys[k]]]); - - return entries; -} /** * @typedef {"LEFT_SIDE"|"RIGHT_SIDE"} Side */ var LEFT_SIDE = 'LEFT_SIDE'; var RIGHT_SIDE = 'RIGHT_SIDE'; + /** * @external AST * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html @@ -4107,555 +3385,519 @@ var RIGHT_SIDE = 'RIGHT_SIDE'; * Get the value of a property which may be multiple levels down * in the object. * @param {?PlainObject} obj - * @param {string} key + * @param {string[]} keys * @returns {undefined|boolean|string|number|external:AST} */ - -function getPath(obj, key) { - var keys = key.split('.'); - - var _iterator = _createForOfIteratorHelper(keys), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var _key = _step.value; - - if (obj == null) { - return obj; - } - - obj = obj[_key]; +function getPath(obj, keys) { + for (var i = 0; i < keys.length; ++i) { + if (obj == null) { + return obj; } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); + obj = obj[keys[i]]; } - return obj; } + /** * Determine whether `node` can be reached by following `path`, * starting at `ancestor`. * @param {?external:AST} node * @param {?external:AST} ancestor * @param {string[]} path + * @param {Integer} fromPathIndex * @returns {boolean} */ - - -function inPath(node, ancestor, path) { - if (path.length === 0) { - return node === ancestor; - } - - if (ancestor == null) { - return false; - } - - var field = ancestor[path[0]]; - var remainingPath = path.slice(1); - - if (Array.isArray(field)) { - var _iterator2 = _createForOfIteratorHelper(field), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var component = _step2.value; - - if (inPath(node, component, remainingPath)) { +function inPath(node, ancestor, path, fromPathIndex) { + var current = ancestor; + for (var i = fromPathIndex; i < path.length; ++i) { + if (current == null) { + return false; + } + var field = current[path[i]]; + if (Array.isArray(field)) { + for (var k = 0; k < field.length; ++k) { + if (inPath(node, field[k], path, i + 1)) { return true; } } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); + return false; } - - return false; - } else { - return inPath(node, field, remainingPath); + current = field; } + return node === current; } + /** - * @callback TraverseOptionFallback - * @param {external:AST} node The given node. - * @returns {string[]} An array of visitor keys for the given node. - */ + * A generated matcher function for a selector. + * @typedef {function} SelectorMatcher +*/ /** - * @typedef {object} ESQueryOptions - * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node. - * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes. - */ + * A WeakMap for holding cached matcher functions for selectors. + * @type {WeakMap} +*/ +var MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap() : null; /** - * Given a `node` and its ancestors, determine if `node` is matched - * by `selector`. - * @param {?external:AST} node + * Look up a matcher function for `selector` in the cache. + * If it does not exist, generate it with `generateMatcher` and add it to the cache. + * In engines without WeakMap, the caching is skipped and matchers are generated with every call. * @param {?SelectorAST} selector - * @param {external:AST[]} [ancestry=[]] - * @param {ESQueryOptions} [options] - * @throws {Error} Unknowns (operator, class name, selector type, or - * selector value type) - * @returns {boolean} + * @returns {SelectorMatcher} */ - - -function matches(node, selector, ancestry, options) { - if (!selector) { - return true; - } - - if (!node) { - return false; +function getMatcher(selector) { + if (selector == null) { + return function () { + return true; + }; } - - if (!ancestry) { - ancestry = []; + if (MATCHER_CACHE != null) { + var matcher = MATCHER_CACHE.get(selector); + if (matcher != null) { + return matcher; + } + matcher = generateMatcher(selector); + MATCHER_CACHE.set(selector, matcher); + return matcher; } + return generateMatcher(selector); +} +/** + * Create a matcher function for `selector`, + * @param {?SelectorAST} selector + * @returns {SelectorMatcher} + */ +function generateMatcher(selector) { switch (selector.type) { case 'wildcard': - return true; - + return function () { + return true; + }; case 'identifier': - return selector.value.toLowerCase() === node.type.toLowerCase(); - + { + var value = selector.value.toLowerCase(); + return function (node, ancestry, options) { + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + return value === node[nodeTypeKey].toLowerCase(); + }; + } case 'field': { var path = selector.name.split('.'); - var ancestor = ancestry[path.length - 1]; - return inPath(node, ancestor, path); + return function (node, ancestry) { + var ancestor = ancestry[path.length - 1]; + return inPath(node, ancestor, path, 0); + }; } - case 'matches': - var _iterator3 = _createForOfIteratorHelper(selector.selectors), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var sel = _step3.value; - - if (matches(node, sel, ancestry, options)) { - return true; + { + var matchers = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < matchers.length; ++i) { + if (matchers[i](node, ancestry, options)) { + return true; + } } - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); + return false; + }; } - - return false; - case 'compound': - var _iterator4 = _createForOfIteratorHelper(selector.selectors), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var _sel = _step4.value; - - if (!matches(node, _sel, ancestry, options)) { - return false; + { + var _matchers = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < _matchers.length; ++i) { + if (!_matchers[i](node, ancestry, options)) { + return false; + } } - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); + return true; + }; } - - return true; - case 'not': - var _iterator5 = _createForOfIteratorHelper(selector.selectors), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var _sel2 = _step5.value; - - if (matches(node, _sel2, ancestry, options)) { - return false; + { + var _matchers2 = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < _matchers2.length; ++i) { + if (_matchers2[i](node, ancestry, options)) { + return false; + } } - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); + return true; + }; } - - return true; - case 'has': { - var _ret = function () { - var collector = []; - - var _iterator6 = _createForOfIteratorHelper(selector.selectors), - _step6; - - try { - var _loop = function _loop() { - var sel = _step6.value; - var a = []; - estraverse.traverse(node, { - enter: function enter(node, parent) { - if (parent != null) { - a.unshift(parent); - } - - if (matches(node, sel, a, options)) { - collector.push(node); - } - }, - leave: function leave() { - a.shift(); - }, - keys: options && options.visitorKeys, - fallback: options && options.fallback || 'iteration' - }); - }; - - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - _loop(); - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - - return { - v: collector.length !== 0 - }; - }(); - - if (_typeof(_ret) === "object") return _ret.v; + var _matchers3 = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + var result = false; + var a = []; + estraverse.traverse(node, { + enter: function enter(node, parent) { + if (parent != null) { + a.unshift(parent); + } + for (var i = 0; i < _matchers3.length; ++i) { + if (_matchers3[i](node, a, options)) { + result = true; + this["break"](); + return; + } + } + }, + leave: function leave() { + a.shift(); + }, + keys: options && options.visitorKeys, + fallback: options && options.fallback || 'iteration' + }); + return result; + }; } - case 'child': - if (matches(node, selector.right, ancestry, options)) { - return matches(ancestry[0], selector.left, ancestry.slice(1), options); + { + var left = getMatcher(selector.left); + var right = getMatcher(selector.right); + return function (node, ancestry, options) { + if (ancestry.length > 0 && right(node, ancestry, options)) { + return left(ancestry[0], ancestry.slice(1), options); + } + return false; + }; } - - return false; - case 'descendant': - if (matches(node, selector.right, ancestry, options)) { - for (var i = 0, l = ancestry.length; i < l; ++i) { - if (matches(ancestry[i], selector.left, ancestry.slice(i + 1), options)) { - return true; + { + var _left = getMatcher(selector.left); + var _right = getMatcher(selector.right); + return function (node, ancestry, options) { + if (_right(node, ancestry, options)) { + for (var i = 0, l = ancestry.length; i < l; ++i) { + if (_left(ancestry[i], ancestry.slice(i + 1), options)) { + return true; + } + } } - } + return false; + }; } - - return false; - case 'attribute': { - var p = getPath(node, selector.name); - + var _path = selector.name.split('.'); switch (selector.operator) { case void 0: - return p != null; - + return function (node) { + return getPath(node, _path) != null; + }; case '=': switch (selector.value.type) { case 'regexp': - return typeof p === 'string' && selector.value.value.test(p); - + return function (node) { + var p = getPath(node, _path); + return typeof p === 'string' && selector.value.value.test(p); + }; case 'literal': - return "".concat(selector.value.value) === "".concat(p); - + { + var literal = "".concat(selector.value.value); + return function (node) { + return literal === "".concat(getPath(node, _path)); + }; + } case 'type': - return selector.value.value === _typeof(p); + return function (node) { + return selector.value.value === _typeof(getPath(node, _path)); + }; } - throw new Error("Unknown selector value type: ".concat(selector.value.type)); - case '!=': switch (selector.value.type) { case 'regexp': - return !selector.value.value.test(p); - + return function (node) { + return !selector.value.value.test(getPath(node, _path)); + }; case 'literal': - return "".concat(selector.value.value) !== "".concat(p); - + { + var _literal = "".concat(selector.value.value); + return function (node) { + return _literal !== "".concat(getPath(node, _path)); + }; + } case 'type': - return selector.value.value !== _typeof(p); + return function (node) { + return selector.value.value !== _typeof(getPath(node, _path)); + }; } - throw new Error("Unknown selector value type: ".concat(selector.value.type)); - case '<=': - return p <= selector.value.value; - + return function (node) { + return getPath(node, _path) <= selector.value.value; + }; case '<': - return p < selector.value.value; - + return function (node) { + return getPath(node, _path) < selector.value.value; + }; case '>': - return p > selector.value.value; - + return function (node) { + return getPath(node, _path) > selector.value.value; + }; case '>=': - return p >= selector.value.value; + return function (node) { + return getPath(node, _path) >= selector.value.value; + }; } - throw new Error("Unknown operator: ".concat(selector.operator)); } - case 'sibling': - return matches(node, selector.right, ancestry, options) && sibling(node, selector.left, ancestry, LEFT_SIDE, options) || selector.left.subject && matches(node, selector.left, ancestry, options) && sibling(node, selector.right, ancestry, RIGHT_SIDE, options); - + { + var _left2 = getMatcher(selector.left); + var _right2 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right2(node, ancestry, options) && sibling(node, _left2, ancestry, LEFT_SIDE, options) || selector.left.subject && _left2(node, ancestry, options) && sibling(node, _right2, ancestry, RIGHT_SIDE, options); + }; + } case 'adjacent': - return matches(node, selector.right, ancestry, options) && adjacent(node, selector.left, ancestry, LEFT_SIDE, options) || selector.right.subject && matches(node, selector.left, ancestry, options) && adjacent(node, selector.right, ancestry, RIGHT_SIDE, options); - + { + var _left3 = getMatcher(selector.left); + var _right3 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right3(node, ancestry, options) && adjacent(node, _left3, ancestry, LEFT_SIDE, options) || selector.right.subject && _left3(node, ancestry, options) && adjacent(node, _right3, ancestry, RIGHT_SIDE, options); + }; + } case 'nth-child': - return matches(node, selector.right, ancestry, options) && nthChild(node, ancestry, function () { - return selector.index.value - 1; - }, options); - + { + var nth = selector.index.value; + var _right4 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right4(node, ancestry, options) && nthChild(node, ancestry, nth, options); + }; + } case 'nth-last-child': - return matches(node, selector.right, ancestry, options) && nthChild(node, ancestry, function (length) { - return length - selector.index.value; - }, options); - + { + var _nth = -selector.index.value; + var _right5 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right5(node, ancestry, options) && nthChild(node, ancestry, _nth, options); + }; + } case 'class': - switch (selector.name.toLowerCase()) { - case 'statement': - if (node.type.slice(-9) === 'Statement') return true; - // fallthrough: interface Declaration <: Statement { } - - case 'declaration': - return node.type.slice(-11) === 'Declaration'; + { + return function (node, ancestry, options) { + if (options && options.matchClass) { + return options.matchClass(selector.name, node, ancestry); + } + if (options && options.nodeTypeKey) return false; + var name = selector.name.toLowerCase(); + switch (name) { + case 'statement': + if (node.type.slice(-9) === 'Statement') return true; + // fallthrough: interface Declaration <: Statement { } + case 'declaration': + return node.type.slice(-11) === 'Declaration'; + case 'pattern': + if (node.type.slice(-7) === 'Pattern') return true; + // fallthrough: interface Expression <: Node, Pattern { } + case 'expression': + return node.type.slice(-10) === 'Expression' || node.type.slice(-7) === 'Literal' || node.type === 'Identifier' && (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty') || node.type === 'MetaProperty'; + case 'function': + return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; + } + throw new Error("Unknown class name: ".concat(selector.name)); + }; + } + } + throw new Error("Unknown selector type: ".concat(selector.type)); +} - case 'pattern': - if (node.type.slice(-7) === 'Pattern') return true; - // fallthrough: interface Expression <: Node, Pattern { } +/** + * @callback TraverseOptionFallback + * @param {external:AST} node The given node. + * @returns {string[]} An array of visitor keys for the given node. + */ - case 'expression': - return node.type.slice(-10) === 'Expression' || node.type.slice(-7) === 'Literal' || node.type === 'Identifier' && (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty') || node.type === 'MetaProperty'; +/** + * @callback ClassMatcher + * @param {string} className The name of the class to match. + * @param {external:AST} node The node to match against. + * @param {Array} ancestry The ancestry of the node. + * @returns {boolean} True if the node matches the class, false if not. + */ - case 'function': - return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; - } +/** + * @typedef {object} ESQueryOptions + * @property {string} [nodeTypeKey="type"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery. + * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node. + * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes. + * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes. + */ - throw new Error("Unknown class name: ".concat(selector.name)); +/** + * Given a `node` and its ancestors, determine if `node` is matched + * by `selector`. + * @param {?external:AST} node + * @param {?SelectorAST} selector + * @param {external:AST[]} [ancestry=[]] + * @param {ESQueryOptions} [options] + * @throws {Error} Unknowns (operator, class name, selector type, or + * selector value type) + * @returns {boolean} + */ +function matches(node, selector, ancestry, options) { + if (!selector) { + return true; } - - throw new Error("Unknown selector type: ".concat(selector.type)); + if (!node) { + return false; + } + if (!ancestry) { + ancestry = []; + } + return getMatcher(selector)(node, ancestry, options); } + /** * Get visitor keys of a given node. * @param {external:AST} node The AST node to get keys. * @param {ESQueryOptions|undefined} options * @returns {string[]} Visitor keys of the node. */ - - function getVisitorKeys(node, options) { - var nodeType = node.type; - + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + var nodeType = node[nodeTypeKey]; if (options && options.visitorKeys && options.visitorKeys[nodeType]) { return options.visitorKeys[nodeType]; } - if (estraverse.VisitorKeys[nodeType]) { return estraverse.VisitorKeys[nodeType]; } - if (options && typeof options.fallback === 'function') { return options.fallback(node); - } // 'iteration' fallback - - + } + // 'iteration' fallback return Object.keys(node).filter(function (key) { - return key !== 'type'; + return key !== nodeTypeKey; }); } + /** * Check whether the given value is an ASTNode or not. * @param {any} node The value to check. + * @param {ESQueryOptions|undefined} options The options to use. * @returns {boolean} `true` if the value is an ASTNode. */ - - -function isNode(node) { - return node !== null && _typeof(node) === 'object' && typeof node.type === 'string'; +function isNode(node, options) { + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + return node !== null && _typeof(node) === 'object' && typeof node[nodeTypeKey] === 'string'; } + /** * Determines if the given node has a sibling that matches the - * given selector. + * given selector matcher. * @param {external:AST} node - * @param {SelectorSequenceAST} selector + * @param {SelectorMatcher} matcher * @param {external:AST[]} ancestry * @param {Side} side * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - -function sibling(node, selector, ancestry, side, options) { +function sibling(node, matcher, ancestry, side, options) { var _ancestry = _slicedToArray(ancestry, 1), - parent = _ancestry[0]; - + parent = _ancestry[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator7 = _createForOfIteratorHelper(keys), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var key = _step7.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var startIndex = listProp.indexOf(node); - - if (startIndex < 0) { - continue; - } - - var lowerBound = void 0, - upperBound = void 0; - - if (side === LEFT_SIDE) { - lowerBound = 0; - upperBound = startIndex; - } else { - lowerBound = startIndex + 1; - upperBound = listProp.length; - } - - for (var k = lowerBound; k < upperBound; ++k) { - if (isNode(listProp[k]) && matches(listProp[k], selector, ancestry, options)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var startIndex = listProp.indexOf(node); + if (startIndex < 0) { + continue; + } + var lowerBound = void 0, + upperBound = void 0; + if (side === LEFT_SIDE) { + lowerBound = 0; + upperBound = startIndex; + } else { + lowerBound = startIndex + 1; + upperBound = listProp.length; + } + for (var k = lowerBound; k < upperBound; ++k) { + if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) { + return true; } } } - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); } - return false; } + /** * Determines if the given node has an adjacent sibling that matches - * the given selector. + * the given selector matcher. * @param {external:AST} node - * @param {SelectorSequenceAST} selector + * @param {SelectorMatcher} matcher * @param {external:AST[]} ancestry * @param {Side} side * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - -function adjacent(node, selector, ancestry, side, options) { +function adjacent(node, matcher, ancestry, side, options) { var _ancestry2 = _slicedToArray(ancestry, 1), - parent = _ancestry2[0]; - + parent = _ancestry2[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator8 = _createForOfIteratorHelper(keys), - _step8; - - try { - for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { - var key = _step8.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var idx = listProp.indexOf(node); - - if (idx < 0) { - continue; - } - - if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1]) && matches(listProp[idx - 1], selector, ancestry, options)) { - return true; - } - - if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1]) && matches(listProp[idx + 1], selector, ancestry, options)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var idx = listProp.indexOf(node); + if (idx < 0) { + continue; + } + if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) { + return true; + } + if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) { + return true; } } - } catch (err) { - _iterator8.e(err); - } finally { - _iterator8.f(); } - return false; } -/** -* @callback IndexFunction -* @param {Integer} len Containing list's length -* @returns {Integer} -*/ /** - * Determines if the given node is the nth child, determined by - * `idxFn`, which is given the containing list's length. + * Determines if the given node is the `nth` child. + * If `nth` is negative then the position is counted + * from the end of the list of children. * @param {external:AST} node * @param {external:AST[]} ancestry - * @param {IndexFunction} idxFn + * @param {Integer} nth * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - -function nthChild(node, ancestry, idxFn, options) { +function nthChild(node, ancestry, nth, options) { + if (nth === 0) { + return false; + } var _ancestry3 = _slicedToArray(ancestry, 1), - parent = _ancestry3[0]; - + parent = _ancestry3[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator9 = _createForOfIteratorHelper(keys), - _step9; - - try { - for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { - var key = _step9.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var idx = listProp.indexOf(node); - - if (idx >= 0 && idx === idxFn(listProp.length)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var idx = nth < 0 ? listProp.length + nth : nth - 1; + if (idx >= 0 && idx < listProp.length && listProp[idx] === node) { + return true; } } - } catch (err) { - _iterator9.e(err); - } finally { - _iterator9.f(); } - return false; } + /** * For each selector node marked as a subject, find the portion of the * selector that the subject must match. @@ -4663,29 +3905,23 @@ function nthChild(node, ancestry, idxFn, options) { * @param {SelectorAST} [ancestor] Defaults to `selector` * @returns {SelectorAST[]} */ - - function subjects(selector, ancestor) { if (selector == null || _typeof(selector) != 'object') { return []; } - if (ancestor == null) { ancestor = selector; } - var results = selector.subject ? [ancestor] : []; - - for (var _i = 0, _Object$entries = _objectEntries(selector); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - p = _Object$entries$_i[0], - sel = _Object$entries$_i[1]; - + var keys = Object.keys(selector); + for (var i = 0; i < keys.length; ++i) { + var p = keys[i]; + var sel = selector[p]; results.push.apply(results, _toConsumableArray(subjects(sel, p === 'left' ? sel : ancestor))); } - return results; } + /** * @callback TraverseVisitor * @param {?external:AST} node @@ -4702,32 +3938,27 @@ function subjects(selector, ancestor) { * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function traverse(ast, selector, visitor, options) { if (!selector) { return; } - var ancestry = []; - var altSubjects = subjects(selector); + var matcher = getMatcher(selector); + var altSubjects = subjects(selector).map(getMatcher); estraverse.traverse(ast, { enter: function enter(node, parent) { if (parent != null) { ancestry.unshift(parent); } - - if (matches(node, selector, ancestry, options)) { + if (matcher(node, ancestry, options)) { if (altSubjects.length) { for (var i = 0, l = altSubjects.length; i < l; ++i) { - if (matches(node, altSubjects[i], ancestry, options)) { + if (altSubjects[i](node, ancestry, options)) { visitor(node, parent, ancestry); } - for (var k = 0, m = ancestry.length; k < m; ++k) { var succeedingAncestry = ancestry.slice(k + 1); - - if (matches(ancestry[k], altSubjects[i], succeedingAncestry, options)) { + if (altSubjects[i](ancestry[k], succeedingAncestry, options)) { visitor(ancestry[k], parent, succeedingAncestry); } } @@ -4744,6 +3975,7 @@ function traverse(ast, selector, visitor, options) { fallback: options && options.fallback || 'iteration' }); } + /** * From a JS AST and a selector AST, collect all JS AST nodes that * match the selector. @@ -4752,8 +3984,6 @@ function traverse(ast, selector, visitor, options) { * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function match(ast, selector, options) { var results = []; traverse(ast, selector, function (node) { @@ -4761,16 +3991,16 @@ function match(ast, selector, options) { }, options); return results; } + /** * Parse a selector string and return its AST. * @param {string} selector * @returns {SelectorAST} */ - - function parse(selector) { return parser.parse(selector); } + /** * Query the code AST using the selector string. * @param {external:AST} ast @@ -4778,12 +4008,9 @@ function parse(selector) { * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function query(ast, selector, options) { return match(ast, parse(selector), options); } - query.parse = parse; query.match = match; query.traverse = traverse; diff --git a/node_modules/esquery/dist/esquery.esm.min.js b/node_modules/esquery/dist/esquery.esm.min.js index cd5ac34bd..ca0f4f97d 100644 --- a/node_modules/esquery/dist/esquery.esm.min.js +++ b/node_modules/esquery/dist/esquery.esm.min.js @@ -1,2 +1,2 @@ -function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(e,t){return e(t={exports:{}},t.exports),t.exports}var s=i((function(e,t){!function e(t){var r,n,a,o,i,s;function l(e){var t,r,n={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],n[t]="object"==typeof r&&null!==r?l(r):r);return n}function u(e,t){this.parent=e,this.key=t}function c(e,t,r,n){this.node=e,this.path=t,this.wrap=r,this.ref=n}function f(){}function p(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function h(e,t){return(e===r.ObjectExpression||e===r.ObjectPattern)&&"properties"===t}function y(e,t){for(var r=e.length-1;r>=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,a,o;for(n=e.length,a=0;n;)t(e[o=a+(r=n>>>1)])?n=r:(a=o+1,n-=r+1);return a}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:o={},Skip:i={},Remove:s={}},u.prototype.replace=function(e){this.parent[this.key]=e},u.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,a;function o(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(l,x[d]))a=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;a=new c(v[m],[f,m],null,null)}r.push(a)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(a=n.pop(),u=this.__execute(t.leave,a),this.__state===o||u===o)return},f.prototype.replace=function(e,t){var r,n,a,l,f,y,d,m,x,v,g,b,A;function E(e){var t,n,a,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if((a=r[t]).ref&&a.ref.parent===o){if(a.ref.key=0;)if(v=a[A=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(l,x[d]))y=new c(v[m],[A,m],"Property",new u(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[A,m],null,new u(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,A,null,new u(a,A)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==o&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||E(y),this.__state===o||f===o)return b.root;return b.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var a,o,i,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,o=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?n.Break:u[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=a,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),l=i((function(e){e.exports&&(e.exports=function(){function e(t,r,n,a){this.message=t,this.expected=r,this.found=n,this.location=a,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=me([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=de(">",!1),y=de("~",!1),d=de("+",!1),m=de(",",!1),x=de("!",!1),v=de("*",!1),g=de("#",!1),b=de("[",!1),A=de("]",!1),E=/^[>","<","!"],!1,!1),_=de("=",!1),w=function(e){return(e||"")+"="},C=/^[><]/,P=me([">","<"],!1,!1),k=de(".",!1),D=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},j=de('"',!1),I=/^[^\\"]/,T=me(["\\",'"'],!0,!1),F=de("\\",!1),L={type:"any"},O=function(e,t){return e+t},R=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},B=de("'",!1),M=/^[^\\']/,U=me(["\\","'"],!0,!1),V=/^[0-9]/,q=me([["0","9"]],!1,!1),N=de("type(",!1),W=/^[^ )]/,K=me([" ",")"],!0,!1),G=de(")",!1),z=/^[imsu]/,H=me(["i","m","s","u"],!1,!1),Y=de("/",!1),$=/^[^\/]/,J=me(["/"],!0,!1),Q=de(":not(",!1),X=de(":matches(",!1),Z=de(":has(",!1),ee=de(":first-child",!1),te=de(":last-child",!1),re=de(":nth-child(",!1),ne=de(":nth-last-child(",!1),ae=de(":",!1),oe=de("statement",!0),ie=de("expression",!0),se=de("declaration",!0),le=de("function",!0),ue=de("pattern",!0),ce=0,fe=[{line:1,column:1}],pe=0,he=[],ye={};if("startRule"in r){if(!(r.startRule in l))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=l[r.startRule]}function de(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function xe(e){var r,n=fe[e];if(n)return n;for(r=e-1;!fe[r];)r--;for(n={line:(n=fe[r]).line,column:n.column};rpe&&(pe=ce,he=[]),he.push(e))}function be(){var e,t,r,n,a=30*ce+0,o=ye[a];return o?(ce=o.nextPos,o.result):(e=ce,(t=Ae())!==s&&(r=_e())!==s&&Ae()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ce=e,e=s),e===s&&(e=ce,(t=Ae())!==s&&(t=void 0),e=t),ye[a]={nextPos:ce,result:e},e)}function Ae(){var e,r,n=30*ce+1,a=ye[n];if(a)return ce=a.nextPos,a.result;for(e=[],32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));r!==s;)e.push(r),32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));return ye[n]={nextPos:ce,result:e},e}function Ee(){var e,r,n,a=30*ce+2,o=ye[a];if(o)return ce=o.nextPos,o.result;if(r=[],f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p));else r=s;return r!==s&&(r=r.join("")),e=r,ye[a]={nextPos:ce,result:e},e}function Se(){var e,r,n,a=30*ce+3,o=ye[a];return o?(ce=o.nextPos,o.result):(e=ce,(r=Ae())!==s?(62===t.charCodeAt(ce)?(n=">",ce++):(n=s,ge(h)),n!==s&&Ae()!==s?e=r="child":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ae())!==s?(126===t.charCodeAt(ce)?(n="~",ce++):(n=s,ge(y)),n!==s&&Ae()!==s?e=r="sibling":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ae())!==s?(43===t.charCodeAt(ce)?(n="+",ce++):(n=s,ge(d)),n!==s&&Ae()!==s?e=r="adjacent":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c)),r!==s&&(n=Ae())!==s?e=r="descendant":(ce=e,e=s)))),ye[a]={nextPos:ce,result:e},e)}function _e(){var e,r,n,a,o,i,l,u,c=30*ce+4,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=we())!==s){for(n=[],a=ce,(o=Ae())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(l=Ae())!==s&&(u=we())!==s?a=o=[o,i,l,u]:(ce=a,a=s)):(ce=a,a=s);a!==s;)n.push(a),a=ce,(o=Ae())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(l=Ae())!==s&&(u=we())!==s?a=o=[o,i,l,u]:(ce=a,a=s)):(ce=a,a=s);n!==s?e=r=[r].concat(n.map((function(e){return e[3]}))):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}function we(){var e,t,r,n,a,o,i,l=30*ce+5,u=ye[l];if(u)return ce=u.nextPos,u.result;if(e=ce,(t=Ce())!==s){for(r=[],n=ce,(a=Se())!==s&&(o=Ce())!==s?n=a=[a,o]:(ce=n,n=s);n!==s;)r.push(n),n=ce,(a=Se())!==s&&(o=Ce())!==s?n=a=[a,o]:(ce=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}function Ce(){var e,r,n,a,o,i,l,u=30*ce+6,c=ye[u];if(c)return ce=c.nextPos,c.result;if(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(x)),r===s&&(r=null),r!==s){if(n=[],(a=Pe())!==s)for(;a!==s;)n.push(a),a=Pe();else n=s;n!==s?(o=r,l=1===(i=n).length?i[0]:{type:"compound",selectors:i},o&&(l.subject=!0),e=r=l):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}function Pe(){var e,r=30*ce+7,n=ye[r];return n?(ce=n.nextPos,n.result):((e=function(){var e,r,n=30*ce+8,a=ye[n];return a?(ce=a.nextPos,a.result):(42===t.charCodeAt(ce)?(r="*",ce++):(r=s,ge(v)),r!==s&&(r={type:"wildcard",value:r}),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,a=30*ce+9,o=ye[a];return o?(ce=o.nextPos,o.result):(e=ce,35===t.charCodeAt(ce)?(r="#",ce++):(r=s,ge(g)),r===s&&(r=null),r!==s&&(n=Ee())!==s?e=r={type:"identifier",value:n}:(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,a,o=30*ce+10,i=ye[o];return i?(ce=i.nextPos,i.result):(e=ce,91===t.charCodeAt(ce)?(r="[",ce++):(r=s,ge(b)),r!==s&&Ae()!==s&&(n=function(){var e,r,n,a,o=30*ce+14,i=ye[o];return i?(ce=i.nextPos,i.result):(e=ce,(r=ke())!==s&&Ae()!==s&&(n=function(){var e,r,n,a=30*ce+12,o=ye[a];return o?(ce=o.nextPos,o.result):(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(x)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(_)),n!==s?(r=w(r),e=r):(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())!==s&&Ae()!==s?((a=function(){var e,r,n,a,o,i=30*ce+18,l=ye[i];if(l)return ce=l.nextPos,l.result;if(e=ce,"type("===t.substr(ce,5)?(r="type(",ce+=5):(r=s,ge(N)),r!==s)if(Ae()!==s){if(n=[],W.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(K)),a!==s)for(;a!==s;)n.push(a),W.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(K));else n=s;n!==s&&(a=Ae())!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(G)),o!==s?(r={type:"type",value:n.join("")},e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(a=function(){var e,r,n,a,o,i,l=30*ce+20,u=ye[l];if(u)return ce=u.nextPos,u.result;if(e=ce,47===t.charCodeAt(ce)?(r="/",ce++):(r=s,ge(Y)),r!==s){if(n=[],$.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(J)),a!==s)for(;a!==s;)n.push(a),$.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(J));else n=s;n!==s?(47===t.charCodeAt(ce)?(a="/",ce++):(a=s,ge(Y)),a!==s?((o=function(){var e,r,n=30*ce+19,a=ye[n];if(a)return ce=a.nextPos,a.result;if(e=[],z.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(H)),r!==s)for(;r!==s;)e.push(r),z.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(H));else e=s;return ye[n]={nextPos:ce,result:e},e}())===s&&(o=null),o!==s?(i=o,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ce=e,e=s)):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}()),a!==s?(r=D(r,n,a),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=ke())!==s&&Ae()!==s&&(n=function(){var e,r,n,a=30*ce+11,o=ye[a];return o?(ce=o.nextPos,o.result):(e=ce,E.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(S)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(_)),n!==s?(r=w(r),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(C.test(t.charAt(ce))?(e=t.charAt(ce),ce++):(e=s,ge(P))),ye[a]={nextPos:ce,result:e},e)}())!==s&&Ae()!==s?((a=function(){var e,r,n,a,o,i,l=30*ce+15,u=ye[l];if(u)return ce=u.nextPos,u.result;if(e=ce,34===t.charCodeAt(ce)?(r='"',ce++):(r=s,ge(j)),r!==s){for(n=[],I.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(T)),a===s&&(a=ce,92===t.charCodeAt(ce)?(o="\\",ce++):(o=s,ge(F)),o!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(o=O(o,i),a=o):(ce=a,a=s)):(ce=a,a=s));a!==s;)n.push(a),I.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(T)),a===s&&(a=ce,92===t.charCodeAt(ce)?(o="\\",ce++):(o=s,ge(F)),o!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(o=O(o,i),a=o):(ce=a,a=s)):(ce=a,a=s));n!==s?(34===t.charCodeAt(ce)?(a='"',ce++):(a=s,ge(j)),a!==s?(r=R(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;if(e===s)if(e=ce,39===t.charCodeAt(ce)?(r="'",ce++):(r=s,ge(B)),r!==s){for(n=[],M.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(U)),a===s&&(a=ce,92===t.charCodeAt(ce)?(o="\\",ce++):(o=s,ge(F)),o!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(o=O(o,i),a=o):(ce=a,a=s)):(ce=a,a=s));a!==s;)n.push(a),M.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(U)),a===s&&(a=ce,92===t.charCodeAt(ce)?(o="\\",ce++):(o=s,ge(F)),o!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(o=O(o,i),a=o):(ce=a,a=s)):(ce=a,a=s));n!==s?(39===t.charCodeAt(ce)?(a="'",ce++):(a=s,ge(B)),a!==s?(r=R(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}())===s&&(a=function(){var e,r,n,a,o,i,l,u=30*ce+16,c=ye[u];if(c)return ce=c.nextPos,c.result;for(e=ce,r=ce,n=[],V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q));a!==s;)n.push(a),V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q));if(n!==s?(46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(k)),a!==s?r=n=[n,a]:(ce=r,r=s)):(ce=r,r=s),r===s&&(r=null),r!==s){if(n=[],V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q)),a!==s)for(;a!==s;)n.push(a),V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q));else n=s;n!==s?(i=n,l=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(l+i.join(""))},e=r):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}())===s&&(a=function(){var e,t,r=30*ce+17,n=ye[r];return n?(ce=n.nextPos,n.result):((t=Ee())!==s&&(t={type:"literal",value:t}),e=t,ye[r]={nextPos:ce,result:e},e)}()),a!==s?(r=D(r,n,a),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=ke())!==s&&(r={type:"attribute",name:r}),e=r)),ye[o]={nextPos:ce,result:e},e)}())!==s&&Ae()!==s?(93===t.charCodeAt(ce)?(a="]",ce++):(a=s,ge(A)),a!==s?e=r=n:(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,a,o,i,l,u,c=30*ce+21,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,46===t.charCodeAt(ce)?(r=".",ce++):(r=s,ge(k)),r!==s)if((n=Ee())!==s){for(a=[],o=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(k)),i!==s&&(l=Ee())!==s?o=i=[i,l]:(ce=o,o=s);o!==s;)a.push(o),o=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(k)),i!==s&&(l=Ee())!==s?o=i=[i,l]:(ce=o,o=s);a!==s?(u=n,r={type:"field",name:a.reduce((function(e,t){return e+t[0]+t[1]}),u)},e=r):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,a,o=30*ce+22,i=ye[o];return i?(ce=i.nextPos,i.result):(e=ce,":not("===t.substr(ce,5)?(r=":not(",ce+=5):(r=s,ge(Q)),r!==s&&Ae()!==s&&(n=_e())!==s&&Ae()!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(G)),a!==s?e=r={type:"not",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,a,o=30*ce+23,i=ye[o];return i?(ce=i.nextPos,i.result):(e=ce,":matches("===t.substr(ce,9)?(r=":matches(",ce+=9):(r=s,ge(X)),r!==s&&Ae()!==s&&(n=_e())!==s&&Ae()!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(G)),a!==s?e=r={type:"matches",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,a,o=30*ce+24,i=ye[o];return i?(ce=i.nextPos,i.result):(e=ce,":has("===t.substr(ce,5)?(r=":has(",ce+=5):(r=s,ge(Z)),r!==s&&Ae()!==s&&(n=_e())!==s&&Ae()!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(G)),a!==s?e=r={type:"has",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=30*ce+25,a=ye[n];return a?(ce=a.nextPos,a.result):(":first-child"===t.substr(ce,12)?(r=":first-child",ce+=12):(r=s,ge(ee)),r!==s&&(r=De(1)),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=30*ce+26,a=ye[n];return a?(ce=a.nextPos,a.result):(":last-child"===t.substr(ce,11)?(r=":last-child",ce+=11):(r=s,ge(te)),r!==s&&(r=je(1)),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,a,o,i=30*ce+27,l=ye[i];if(l)return ce=l.nextPos,l.result;if(e=ce,":nth-child("===t.substr(ce,11)?(r=":nth-child(",ce+=11):(r=s,ge(re)),r!==s)if(Ae()!==s){if(n=[],V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q)),a!==s)for(;a!==s;)n.push(a),V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q));else n=s;n!==s&&(a=Ae())!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(G)),o!==s?(r=De(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,a,o,i=30*ce+28,l=ye[i];if(l)return ce=l.nextPos,l.result;if(e=ce,":nth-last-child("===t.substr(ce,16)?(r=":nth-last-child(",ce+=16):(r=s,ge(ne)),r!==s)if(Ae()!==s){if(n=[],V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q)),a!==s)for(;a!==s;)n.push(a),V.test(t.charAt(ce))?(a=t.charAt(ce),ce++):(a=s,ge(q));else n=s;n!==s&&(a=Ae())!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(G)),o!==s?(r=je(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,a=30*ce+29,o=ye[a];return o?(ce=o.nextPos,o.result):(e=ce,58===t.charCodeAt(ce)?(r=":",ce++):(r=s,ge(ae)),r!==s?("statement"===t.substr(ce,9).toLowerCase()?(n=t.substr(ce,9),ce+=9):(n=s,ge(oe)),n===s&&("expression"===t.substr(ce,10).toLowerCase()?(n=t.substr(ce,10),ce+=10):(n=s,ge(ie)),n===s&&("declaration"===t.substr(ce,11).toLowerCase()?(n=t.substr(ce,11),ce+=11):(n=s,ge(se)),n===s&&("function"===t.substr(ce,8).toLowerCase()?(n=t.substr(ce,8),ce+=8):(n=s,ge(le)),n===s&&("pattern"===t.substr(ce,7).toLowerCase()?(n=t.substr(ce,7),ce+=7):(n=s,ge(ue)))))),n!==s?e=r={type:"class",name:n}:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}()),ye[r]={nextPos:ce,result:e},e)}function ke(){var e,r,n,a,o,i,l,u,c=30*ce+13,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=Ee())!==s){for(n=[],a=ce,46===t.charCodeAt(ce)?(o=".",ce++):(o=s,ge(k)),o!==s&&(i=Ee())!==s?a=o=[o,i]:(ce=a,a=s);a!==s;)n.push(a),a=ce,46===t.charCodeAt(ce)?(o=".",ce++):(o=s,ge(k)),o!==s&&(i=Ee())!==s?a=o=[o,i]:(ce=a,a=s);n!==s?(l=r,u=n,e=r=[].concat.apply([l],u).join("")):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}function De(e){return{type:"nth-child",index:{type:"literal",value:e}}}function je(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=u())!==s&&ce===t.length)return n;throw n!==s&&ce":return w>r.value.value;case">=":return w>=r.value.value}throw new Error("Unknown operator: ".concat(r.operator));case"sibling":return u(t,r.right,n,a)&&p(t,r.left,n,"LEFT_SIDE",a)||r.left.subject&&u(t,r.left,n,a)&&p(t,r.right,n,"RIGHT_SIDE",a);case"adjacent":return u(t,r.right,n,a)&&h(t,r.left,n,"LEFT_SIDE",a)||r.right.subject&&u(t,r.left,n,a)&&h(t,r.right,n,"RIGHT_SIDE",a);case"nth-child":return u(t,r.right,n,a)&&y(t,n,(function(){return r.index.value-1}),a);case"nth-last-child":return u(t,r.right,n,a)&&y(t,n,(function(e){return e-r.index.value}),a);case"class":switch(r.name.toLowerCase()){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===n.length||"MetaProperty"!==n[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(r.name))}throw new Error("Unknown selector type: ".concat(r.type))}function c(e,t){var r=e.type;return t&&t.visitorKeys&&t.visitorKeys[r]?t.visitorKeys[r]:s.VisitorKeys[r]?s.VisitorKeys[r]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return"type"!==e}))}function f(t){return null!==t&&"object"===e(t)&&"string"==typeof t.type}function p(e,r,n,a,i){var s=t(n,1)[0];if(!s)return!1;var l,p=o(c(s,i));try{for(p.s();!(l=p.n()).done;){var h=s[l.value];if(Array.isArray(h)){var y=h.indexOf(e);if(y<0)continue;var d=void 0,m=void 0;"LEFT_SIDE"===a?(d=0,m=y):(d=y+1,m=h.length);for(var x=d;x0&&f(h[y-1])&&u(h[y-1],r,n,i))return!0;if("RIGHT_SIDE"===a&&y=0&&f===n(u.length))return!0}}}catch(e){l.e(e)}finally{l.f()}return!1}function d(n,a){if(null==n||"object"!=e(n))return[];null==a&&(a=n);for(var o=n.subject?[a]:[],i=0,s=function(e){for(var t=[],r=Object.keys(e),n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,a,o;for(n=e.length,a=0;n;)t(e[o=a+(r=n>>>1)])?n=r:(a=o+1,n-=r+1);return a}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:o={},Skip:i={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,a;function o(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(u,x[d]))a=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;a=new c(v[m],[f,m],null,null)}r.push(a)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(a=n.pop(),l=this.__execute(t.leave,a),this.__state===o||l===o)return},f.prototype.replace=function(e,t){var r,n,a,u,f,y,d,m,x,v,g,A,E;function b(e){var t,n,a,o;if(e.ref.remove())for(n=e.ref.key,o=e.ref.parent,t=r.length;t--;)if((a=r[t]).ref&&a.ref.parent===o){if(a.ref.key=0;)if(v=a[E=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(u,x[d]))y=new c(v[m],[E,m],"Property",new l(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[E,m],null,new l(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,E,null,new l(a,E)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==o&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||b(y),this.__state===o||f===o)return A.root;return A.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var a,o,i,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,o=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?n.Break:l[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=a,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),s=o((function(e){e.exports&&(e.exports=function(){function e(t,r,n,a){this.message=t,this.expected=r,this.found=n,this.location=a,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=fe([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=ce(">",!1),y=ce("~",!1),d=ce("+",!1),m=ce(",",!1),x=ce("!",!1),v=ce("*",!1),g=ce("#",!1),A=ce("[",!1),E=ce("]",!1),b=/^[>","<","!"],!1,!1),_=ce("=",!1),C=function(e){return(e||"")+"="},w=/^[><]/,P=fe([">","<"],!1,!1),k=ce(".",!1),D=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},I=ce('"',!1),j=/^[^\\"]/,T=fe(["\\",'"'],!0,!1),F=ce("\\",!1),R={type:"any"},O=function(e,t){return e+t},L=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},M=ce("'",!1),B=/^[^\\']/,U=fe(["\\","'"],!0,!1),K=/^[0-9]/,W=fe([["0","9"]],!1,!1),V=ce("type(",!1),q=/^[^ )]/,N=fe([" ",")"],!0,!1),G=ce(")",!1),z=/^[imsu]/,H=fe(["i","m","s","u"],!1,!1),Y=ce("/",!1),$=/^[^\/]/,J=fe(["/"],!0,!1),Q=ce(":not(",!1),X=ce(":matches(",!1),Z=ce(":has(",!1),ee=ce(":first-child",!1),te=ce(":last-child",!1),re=ce(":nth-child(",!1),ne=ce(":nth-last-child(",!1),ae=ce(":",!1),oe=0,ie=[{line:1,column:1}],se=0,ue=[],le={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function ce(e,t){return{type:"literal",text:e,ignoreCase:t}}function fe(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function pe(e){var r,n=ie[e];if(n)return n;for(r=e-1;!ie[r];)r--;for(n={line:(n=ie[r]).line,column:n.column};rse&&(se=oe,ue=[]),ue.push(e))}function de(){var e,t,r,n,a=30*oe+0,o=le[a];return o?(oe=o.nextPos,o.result):(e=oe,(t=me())!==s&&(r=ge())!==s&&me()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(oe=e,e=s),e===s&&(e=oe,(t=me())!==s&&(t=void 0),e=t),le[a]={nextPos:oe,result:e},e)}function me(){var e,r,n=30*oe+1,a=le[n];if(a)return oe=a.nextPos,a.result;for(e=[],32===t.charCodeAt(oe)?(r=" ",oe++):(r=s,ye(c));r!==s;)e.push(r),32===t.charCodeAt(oe)?(r=" ",oe++):(r=s,ye(c));return le[n]={nextPos:oe,result:e},e}function xe(){var e,r,n,a=30*oe+2,o=le[a];if(o)return oe=o.nextPos,o.result;if(r=[],f.test(t.charAt(oe))?(n=t.charAt(oe),oe++):(n=s,ye(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(oe))?(n=t.charAt(oe),oe++):(n=s,ye(p));else r=s;return r!==s&&(r=r.join("")),e=r,le[a]={nextPos:oe,result:e},e}function ve(){var e,r,n,a=30*oe+3,o=le[a];return o?(oe=o.nextPos,o.result):(e=oe,(r=me())!==s?(62===t.charCodeAt(oe)?(n=">",oe++):(n=s,ye(h)),n!==s&&me()!==s?e=r="child":(oe=e,e=s)):(oe=e,e=s),e===s&&(e=oe,(r=me())!==s?(126===t.charCodeAt(oe)?(n="~",oe++):(n=s,ye(y)),n!==s&&me()!==s?e=r="sibling":(oe=e,e=s)):(oe=e,e=s),e===s&&(e=oe,(r=me())!==s?(43===t.charCodeAt(oe)?(n="+",oe++):(n=s,ye(d)),n!==s&&me()!==s?e=r="adjacent":(oe=e,e=s)):(oe=e,e=s),e===s&&(e=oe,32===t.charCodeAt(oe)?(r=" ",oe++):(r=s,ye(c)),r!==s&&(n=me())!==s?e=r="descendant":(oe=e,e=s)))),le[a]={nextPos:oe,result:e},e)}function ge(){var e,r,n,a,o,i,u,l,c=30*oe+4,f=le[c];if(f)return oe=f.nextPos,f.result;if(e=oe,(r=Ae())!==s){for(n=[],a=oe,(o=me())!==s?(44===t.charCodeAt(oe)?(i=",",oe++):(i=s,ye(m)),i!==s&&(u=me())!==s&&(l=Ae())!==s?a=o=[o,i,u,l]:(oe=a,a=s)):(oe=a,a=s);a!==s;)n.push(a),a=oe,(o=me())!==s?(44===t.charCodeAt(oe)?(i=",",oe++):(i=s,ye(m)),i!==s&&(u=me())!==s&&(l=Ae())!==s?a=o=[o,i,u,l]:(oe=a,a=s)):(oe=a,a=s);n!==s?e=r=[r].concat(n.map((function(e){return e[3]}))):(oe=e,e=s)}else oe=e,e=s;return le[c]={nextPos:oe,result:e},e}function Ae(){var e,t,r,n,a,o,i,u=30*oe+5,l=le[u];if(l)return oe=l.nextPos,l.result;if(e=oe,(t=Ee())!==s){for(r=[],n=oe,(a=ve())!==s&&(o=Ee())!==s?n=a=[a,o]:(oe=n,n=s);n!==s;)r.push(n),n=oe,(a=ve())!==s&&(o=Ee())!==s?n=a=[a,o]:(oe=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(oe=e,e=s)}else oe=e,e=s;return le[u]={nextPos:oe,result:e},e}function Ee(){var e,r,n,a,o,i,u,l=30*oe+6,c=le[l];if(c)return oe=c.nextPos,c.result;if(e=oe,33===t.charCodeAt(oe)?(r="!",oe++):(r=s,ye(x)),r===s&&(r=null),r!==s){if(n=[],(a=be())!==s)for(;a!==s;)n.push(a),a=be();else n=s;n!==s?(o=r,u=1===(i=n).length?i[0]:{type:"compound",selectors:i},o&&(u.subject=!0),e=r=u):(oe=e,e=s)}else oe=e,e=s;return le[l]={nextPos:oe,result:e},e}function be(){var e,r=30*oe+7,n=le[r];return n?(oe=n.nextPos,n.result):((e=function(){var e,r,n=30*oe+8,a=le[n];return a?(oe=a.nextPos,a.result):(42===t.charCodeAt(oe)?(r="*",oe++):(r=s,ye(v)),r!==s&&(r={type:"wildcard",value:r}),e=r,le[n]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n,a=30*oe+9,o=le[a];return o?(oe=o.nextPos,o.result):(e=oe,35===t.charCodeAt(oe)?(r="#",oe++):(r=s,ye(g)),r===s&&(r=null),r!==s&&(n=xe())!==s?e=r={type:"identifier",value:n}:(oe=e,e=s),le[a]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n,a,o=30*oe+10,i=le[o];return i?(oe=i.nextPos,i.result):(e=oe,91===t.charCodeAt(oe)?(r="[",oe++):(r=s,ye(A)),r!==s&&me()!==s&&(n=function(){var e,r,n,a,o=30*oe+14,i=le[o];return i?(oe=i.nextPos,i.result):(e=oe,(r=Se())!==s&&me()!==s&&(n=function(){var e,r,n,a=30*oe+12,o=le[a];return o?(oe=o.nextPos,o.result):(e=oe,33===t.charCodeAt(oe)?(r="!",oe++):(r=s,ye(x)),r===s&&(r=null),r!==s?(61===t.charCodeAt(oe)?(n="=",oe++):(n=s,ye(_)),n!==s?(r=C(r),e=r):(oe=e,e=s)):(oe=e,e=s),le[a]={nextPos:oe,result:e},e)}())!==s&&me()!==s?((a=function(){var e,r,n,a,o,i=30*oe+18,u=le[i];if(u)return oe=u.nextPos,u.result;if(e=oe,"type("===t.substr(oe,5)?(r="type(",oe+=5):(r=s,ye(V)),r!==s)if(me()!==s){if(n=[],q.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(N)),a!==s)for(;a!==s;)n.push(a),q.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(N));else n=s;n!==s&&(a=me())!==s?(41===t.charCodeAt(oe)?(o=")",oe++):(o=s,ye(G)),o!==s?(r={type:"type",value:n.join("")},e=r):(oe=e,e=s)):(oe=e,e=s)}else oe=e,e=s;else oe=e,e=s;return le[i]={nextPos:oe,result:e},e}())===s&&(a=function(){var e,r,n,a,o,i,u=30*oe+20,l=le[u];if(l)return oe=l.nextPos,l.result;if(e=oe,47===t.charCodeAt(oe)?(r="/",oe++):(r=s,ye(Y)),r!==s){if(n=[],$.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(J)),a!==s)for(;a!==s;)n.push(a),$.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(J));else n=s;n!==s?(47===t.charCodeAt(oe)?(a="/",oe++):(a=s,ye(Y)),a!==s?((o=function(){var e,r,n=30*oe+19,a=le[n];if(a)return oe=a.nextPos,a.result;if(e=[],z.test(t.charAt(oe))?(r=t.charAt(oe),oe++):(r=s,ye(H)),r!==s)for(;r!==s;)e.push(r),z.test(t.charAt(oe))?(r=t.charAt(oe),oe++):(r=s,ye(H));else e=s;return le[n]={nextPos:oe,result:e},e}())===s&&(o=null),o!==s?(i=o,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(oe=e,e=s)):(oe=e,e=s)):(oe=e,e=s)}else oe=e,e=s;return le[u]={nextPos:oe,result:e},e}()),a!==s?(r=D(r,n,a),e=r):(oe=e,e=s)):(oe=e,e=s),e===s&&(e=oe,(r=Se())!==s&&me()!==s&&(n=function(){var e,r,n,a=30*oe+11,o=le[a];return o?(oe=o.nextPos,o.result):(e=oe,b.test(t.charAt(oe))?(r=t.charAt(oe),oe++):(r=s,ye(S)),r===s&&(r=null),r!==s?(61===t.charCodeAt(oe)?(n="=",oe++):(n=s,ye(_)),n!==s?(r=C(r),e=r):(oe=e,e=s)):(oe=e,e=s),e===s&&(w.test(t.charAt(oe))?(e=t.charAt(oe),oe++):(e=s,ye(P))),le[a]={nextPos:oe,result:e},e)}())!==s&&me()!==s?((a=function(){var e,r,n,a,o,i,u=30*oe+15,l=le[u];if(l)return oe=l.nextPos,l.result;if(e=oe,34===t.charCodeAt(oe)?(r='"',oe++):(r=s,ye(I)),r!==s){for(n=[],j.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(T)),a===s&&(a=oe,92===t.charCodeAt(oe)?(o="\\",oe++):(o=s,ye(F)),o!==s?(t.length>oe?(i=t.charAt(oe),oe++):(i=s,ye(R)),i!==s?(o=O(o,i),a=o):(oe=a,a=s)):(oe=a,a=s));a!==s;)n.push(a),j.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(T)),a===s&&(a=oe,92===t.charCodeAt(oe)?(o="\\",oe++):(o=s,ye(F)),o!==s?(t.length>oe?(i=t.charAt(oe),oe++):(i=s,ye(R)),i!==s?(o=O(o,i),a=o):(oe=a,a=s)):(oe=a,a=s));n!==s?(34===t.charCodeAt(oe)?(a='"',oe++):(a=s,ye(I)),a!==s?(r=L(n),e=r):(oe=e,e=s)):(oe=e,e=s)}else oe=e,e=s;if(e===s)if(e=oe,39===t.charCodeAt(oe)?(r="'",oe++):(r=s,ye(M)),r!==s){for(n=[],B.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(U)),a===s&&(a=oe,92===t.charCodeAt(oe)?(o="\\",oe++):(o=s,ye(F)),o!==s?(t.length>oe?(i=t.charAt(oe),oe++):(i=s,ye(R)),i!==s?(o=O(o,i),a=o):(oe=a,a=s)):(oe=a,a=s));a!==s;)n.push(a),B.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(U)),a===s&&(a=oe,92===t.charCodeAt(oe)?(o="\\",oe++):(o=s,ye(F)),o!==s?(t.length>oe?(i=t.charAt(oe),oe++):(i=s,ye(R)),i!==s?(o=O(o,i),a=o):(oe=a,a=s)):(oe=a,a=s));n!==s?(39===t.charCodeAt(oe)?(a="'",oe++):(a=s,ye(M)),a!==s?(r=L(n),e=r):(oe=e,e=s)):(oe=e,e=s)}else oe=e,e=s;return le[u]={nextPos:oe,result:e},e}())===s&&(a=function(){var e,r,n,a,o,i,u,l=30*oe+16,c=le[l];if(c)return oe=c.nextPos,c.result;for(e=oe,r=oe,n=[],K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W));a!==s;)n.push(a),K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W));if(n!==s?(46===t.charCodeAt(oe)?(a=".",oe++):(a=s,ye(k)),a!==s?r=n=[n,a]:(oe=r,r=s)):(oe=r,r=s),r===s&&(r=null),r!==s){if(n=[],K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W)),a!==s)for(;a!==s;)n.push(a),K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W));else n=s;n!==s?(i=n,u=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(u+i.join(""))},e=r):(oe=e,e=s)}else oe=e,e=s;return le[l]={nextPos:oe,result:e},e}())===s&&(a=function(){var e,t,r=30*oe+17,n=le[r];return n?(oe=n.nextPos,n.result):((t=xe())!==s&&(t={type:"literal",value:t}),e=t,le[r]={nextPos:oe,result:e},e)}()),a!==s?(r=D(r,n,a),e=r):(oe=e,e=s)):(oe=e,e=s),e===s&&(e=oe,(r=Se())!==s&&(r={type:"attribute",name:r}),e=r)),le[o]={nextPos:oe,result:e},e)}())!==s&&me()!==s?(93===t.charCodeAt(oe)?(a="]",oe++):(a=s,ye(E)),a!==s?e=r=n:(oe=e,e=s)):(oe=e,e=s),le[o]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n,a,o,i,u,l,c=30*oe+21,f=le[c];if(f)return oe=f.nextPos,f.result;if(e=oe,46===t.charCodeAt(oe)?(r=".",oe++):(r=s,ye(k)),r!==s)if((n=xe())!==s){for(a=[],o=oe,46===t.charCodeAt(oe)?(i=".",oe++):(i=s,ye(k)),i!==s&&(u=xe())!==s?o=i=[i,u]:(oe=o,o=s);o!==s;)a.push(o),o=oe,46===t.charCodeAt(oe)?(i=".",oe++):(i=s,ye(k)),i!==s&&(u=xe())!==s?o=i=[i,u]:(oe=o,o=s);a!==s?(l=n,r={type:"field",name:a.reduce((function(e,t){return e+t[0]+t[1]}),l)},e=r):(oe=e,e=s)}else oe=e,e=s;else oe=e,e=s;return le[c]={nextPos:oe,result:e},e}())===s&&(e=function(){var e,r,n,a,o=30*oe+22,i=le[o];return i?(oe=i.nextPos,i.result):(e=oe,":not("===t.substr(oe,5)?(r=":not(",oe+=5):(r=s,ye(Q)),r!==s&&me()!==s&&(n=ge())!==s&&me()!==s?(41===t.charCodeAt(oe)?(a=")",oe++):(a=s,ye(G)),a!==s?e=r={type:"not",selectors:n}:(oe=e,e=s)):(oe=e,e=s),le[o]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n,a,o=30*oe+23,i=le[o];return i?(oe=i.nextPos,i.result):(e=oe,":matches("===t.substr(oe,9)?(r=":matches(",oe+=9):(r=s,ye(X)),r!==s&&me()!==s&&(n=ge())!==s&&me()!==s?(41===t.charCodeAt(oe)?(a=")",oe++):(a=s,ye(G)),a!==s?e=r={type:"matches",selectors:n}:(oe=e,e=s)):(oe=e,e=s),le[o]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n,a,o=30*oe+24,i=le[o];return i?(oe=i.nextPos,i.result):(e=oe,":has("===t.substr(oe,5)?(r=":has(",oe+=5):(r=s,ye(Z)),r!==s&&me()!==s&&(n=ge())!==s&&me()!==s?(41===t.charCodeAt(oe)?(a=")",oe++):(a=s,ye(G)),a!==s?e=r={type:"has",selectors:n}:(oe=e,e=s)):(oe=e,e=s),le[o]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n=30*oe+25,a=le[n];return a?(oe=a.nextPos,a.result):(":first-child"===t.substr(oe,12)?(r=":first-child",oe+=12):(r=s,ye(ee)),r!==s&&(r=_e(1)),e=r,le[n]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n=30*oe+26,a=le[n];return a?(oe=a.nextPos,a.result):(":last-child"===t.substr(oe,11)?(r=":last-child",oe+=11):(r=s,ye(te)),r!==s&&(r=Ce(1)),e=r,le[n]={nextPos:oe,result:e},e)}())===s&&(e=function(){var e,r,n,a,o,i=30*oe+27,u=le[i];if(u)return oe=u.nextPos,u.result;if(e=oe,":nth-child("===t.substr(oe,11)?(r=":nth-child(",oe+=11):(r=s,ye(re)),r!==s)if(me()!==s){if(n=[],K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W)),a!==s)for(;a!==s;)n.push(a),K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W));else n=s;n!==s&&(a=me())!==s?(41===t.charCodeAt(oe)?(o=")",oe++):(o=s,ye(G)),o!==s?(r=_e(parseInt(n.join(""),10)),e=r):(oe=e,e=s)):(oe=e,e=s)}else oe=e,e=s;else oe=e,e=s;return le[i]={nextPos:oe,result:e},e}())===s&&(e=function(){var e,r,n,a,o,i=30*oe+28,u=le[i];if(u)return oe=u.nextPos,u.result;if(e=oe,":nth-last-child("===t.substr(oe,16)?(r=":nth-last-child(",oe+=16):(r=s,ye(ne)),r!==s)if(me()!==s){if(n=[],K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W)),a!==s)for(;a!==s;)n.push(a),K.test(t.charAt(oe))?(a=t.charAt(oe),oe++):(a=s,ye(W));else n=s;n!==s&&(a=me())!==s?(41===t.charCodeAt(oe)?(o=")",oe++):(o=s,ye(G)),o!==s?(r=Ce(parseInt(n.join(""),10)),e=r):(oe=e,e=s)):(oe=e,e=s)}else oe=e,e=s;else oe=e,e=s;return le[i]={nextPos:oe,result:e},e}())===s&&(e=function(){var e,r,n,a=30*oe+29,o=le[a];return o?(oe=o.nextPos,o.result):(e=oe,58===t.charCodeAt(oe)?(r=":",oe++):(r=s,ye(ae)),r!==s&&(n=xe())!==s?e=r={type:"class",name:n}:(oe=e,e=s),le[a]={nextPos:oe,result:e},e)}()),le[r]={nextPos:oe,result:e},e)}function Se(){var e,r,n,a,o,i,u,l,c=30*oe+13,f=le[c];if(f)return oe=f.nextPos,f.result;if(e=oe,(r=xe())!==s){for(n=[],a=oe,46===t.charCodeAt(oe)?(o=".",oe++):(o=s,ye(k)),o!==s&&(i=xe())!==s?a=o=[o,i]:(oe=a,a=s);a!==s;)n.push(a),a=oe,46===t.charCodeAt(oe)?(o=".",oe++):(o=s,ye(k)),o!==s&&(i=xe())!==s?a=o=[o,i]:(oe=a,a=s);n!==s?(u=r,l=n,e=r=[].concat.apply([u],l).join("")):(oe=e,e=s)}else oe=e,e=s;return le[c]={nextPos:oe,result:e},e}function _e(e){return{type:"nth-child",index:{type:"literal",value:e}}}function Ce(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=l())!==s&&oe===t.length)return n;throw n!==s&&oe0&&p(e,t,r))&&f(t[0],t.slice(1),r)};case"descendant":var h=c(t.left),x=c(t.right);return function(e,t,r){if(x(e,t,r))for(var n=0,a=t.length;n":return function(e){return u(e,v)>t.value.value};case">=":return function(e){return u(e,v)>=t.value.value}}throw new Error("Unknown operator: ".concat(t.operator));case"sibling":var E=c(t.left),b=c(t.right);return function(e,r,n){return b(e,r,n)&&y(e,E,r,"LEFT_SIDE",n)||t.left.subject&&E(e,r,n)&&y(e,b,r,"RIGHT_SIDE",n)};case"adjacent":var S=c(t.left),_=c(t.right);return function(e,r,n){return _(e,r,n)&&d(e,S,r,"LEFT_SIDE",n)||t.right.subject&&S(e,r,n)&&d(e,_,r,"RIGHT_SIDE",n)};case"nth-child":var C=t.index.value,w=c(t.right);return function(e,t,r){return w(e,t,r)&&m(e,t,C,r)};case"nth-last-child":var P=-t.index.value,k=c(t.right);return function(e,t,r){return k(e,t,r)&&m(e,t,P,r)};case"class":return function(e,r,n){if(n&&n.matchClass)return n.matchClass(t.name,e,r);if(n&&n.nodeTypeKey)return!1;switch(t.name.toLowerCase()){case"statement":if("Statement"===e.type.slice(-9))return!0;case"declaration":return"Declaration"===e.type.slice(-11);case"pattern":if("Pattern"===e.type.slice(-7))return!0;case"expression":return"Expression"===e.type.slice(-10)||"Literal"===e.type.slice(-7)||"Identifier"===e.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===e.type;case"function":return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}throw new Error("Unknown class name: ".concat(t.name))}}throw new Error("Unknown selector type: ".concat(t.type))}function p(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:i.VisitorKeys[n]?i.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return e!==r}))}function h(t,r){var n=r&&r.nodeTypeKey||"type";return null!==t&&"object"===e(t)&&"string"==typeof t[n]}function y(e,r,n,a,o){var i=t(n,1)[0];if(!i)return!1;for(var s=p(i,o),u=0;u0&&h(l[c-1],o)&&r(l[c-1],n,o))return!0;if("RIGHT_SIDE"===a&&c=0&&l\n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n Program: 'Program',\n Property: 'Property',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n Program: ['body'],\n Property: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[>\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = \"statement\",\n peg$c103 = peg$literalExpectation(\"statement\", true),\n peg$c104 = \"expression\",\n peg$c105 = peg$literalExpectation(\"expression\", true),\n peg$c106 = \"declaration\",\n peg$c107 = peg$literalExpectation(\"declaration\", true),\n peg$c108 = \"function\",\n peg$c109 = peg$literalExpectation(\"function\", true),\n peg$c110 = \"pattern\",\n peg$c111 = peg$literalExpectation(\"pattern\", true),\n peg$c112 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) {\n s2 = input.substr(peg$currPos, 9);\n peg$currPos += 9;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c103); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) {\n s2 = input.substr(peg$currPos, 10);\n peg$currPos += 10;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c105); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) {\n s2 = input.substr(peg$currPos, 11);\n peg$currPos += 11;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c107); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) {\n s2 = input.substr(peg$currPos, 8);\n peg$currPos += 8;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c109); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) {\n s2 = input.substr(peg$currPos, 7);\n peg$currPos += 7;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c111); }\n }\n }\n }\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c112(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string} key\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, key) {\n const keys = key.split('.');\n for (const key of keys) {\n if (obj == null) { return obj; }\n obj = obj[key];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path) {\n if (path.length === 0) { return node === ancestor; }\n if (ancestor == null) { return false; }\n const field = ancestor[path[0]];\n const remainingPath = path.slice(1);\n if (Array.isArray(field)) {\n for (const component of field) {\n if (inPath(node, component, remainingPath)) { return true; }\n }\n return false;\n } else {\n return inPath(node, field, remainingPath);\n }\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n/**\n * @typedef {object} ESQueryOptions\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n switch(selector.type) {\n case 'wildcard':\n return true;\n\n case 'identifier':\n return selector.value.toLowerCase() === node.type.toLowerCase();\n\n case 'field': {\n const path = selector.name.split('.');\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path);\n\n }\n case 'matches':\n for (const sel of selector.selectors) {\n if (matches(node, sel, ancestry, options)) { return true; }\n }\n return false;\n\n case 'compound':\n for (const sel of selector.selectors) {\n if (!matches(node, sel, ancestry, options)) { return false; }\n }\n return true;\n\n case 'not':\n for (const sel of selector.selectors) {\n if (matches(node, sel, ancestry, options)) { return false; }\n }\n return true;\n\n case 'has': {\n const collector = [];\n for (const sel of selector.selectors) {\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n if (matches(node, sel, a, options)) {\n collector.push(node);\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n }\n return collector.length !== 0;\n\n }\n case 'child':\n if (matches(node, selector.right, ancestry, options)) {\n return matches(ancestry[0], selector.left, ancestry.slice(1), options);\n }\n return false;\n\n case 'descendant':\n if (matches(node, selector.right, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (matches(ancestry[i], selector.left, ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n\n case 'attribute': {\n const p = getPath(node, selector.name);\n switch (selector.operator) {\n case void 0:\n return p != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp': return typeof p === 'string' && selector.value.value.test(p);\n case 'literal': return `${selector.value.value}` === `${p}`;\n case 'type': return selector.value.value === typeof p;\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp': return !selector.value.value.test(p);\n case 'literal': return `${selector.value.value}` !== `${p}`;\n case 'type': return selector.value.value !== typeof p;\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=': return p <= selector.value.value;\n case '<': return p < selector.value.value;\n case '>': return p > selector.value.value;\n case '>=': return p >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n case 'sibling':\n return matches(node, selector.right, ancestry, options) &&\n sibling(node, selector.left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n matches(node, selector.left, ancestry, options) &&\n sibling(node, selector.right, ancestry, RIGHT_SIDE, options);\n case 'adjacent':\n return matches(node, selector.right, ancestry, options) &&\n adjacent(node, selector.left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n matches(node, selector.left, ancestry, options) &&\n adjacent(node, selector.right, ancestry, RIGHT_SIDE, options);\n\n case 'nth-child':\n return matches(node, selector.right, ancestry, options) &&\n nthChild(node, ancestry, function () {\n return selector.index.value - 1;\n }, options);\n\n case 'nth-last-child':\n return matches(node, selector.right, ancestry, options) &&\n nthChild(node, ancestry, function (length) {\n return length - selector.index.value;\n }, options);\n\n case 'class':\n switch(selector.name.toLowerCase()){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeType = node.type;\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== 'type';\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node) {\n return node !== null && typeof node === 'object' && typeof node.type === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector.\n * @param {external:AST} node\n * @param {SelectorSequenceAST} selector\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, selector, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k]) && matches(listProp[k], selector, ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector.\n * @param {external:AST} node\n * @param {SelectorSequenceAST} selector\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, selector, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1]) && matches(listProp[idx - 1], selector, ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1]) && matches(listProp[idx + 1], selector, ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n* @callback IndexFunction\n* @param {Integer} len Containing list's length\n* @returns {Integer}\n*/\n\n/**\n * Determines if the given node is the nth child, determined by\n * `idxFn`, which is given the containing list's length.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {IndexFunction} idxFn\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, idxFn, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx >= 0 && idx === idxFn(listProp.length)) { return true; }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n for (const [p, sel] of Object.entries(selector)) {\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const altSubjects = subjects(selector);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matches(node, selector, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (matches(node, altSubjects[i], ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (matches(ancestry[k], altSubjects[i], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","Program","Property","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","this","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$c103","peg$c105","peg$c107","peg$c109","peg$c111","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","ss","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","toLowerCase","peg$parseclass","n","index","factory","matches","selector","ancestry","split","ancestor","inPath","field","remainingPath","sel","collector","estraverse","unshift","shift","visitorKeys","l","getPath","sibling","adjacent","nthChild","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","k","idx","idxFn","subjects","results","_objectEntries","ast","altSubjects","m","succeedingAncestry","parser","query"],"mappings":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EAAIjC,EAASzV,OAAQkX,EAAIQ,IAAKR,EAAG,KACvCS,EAAqBlC,EAAStK,MAAM+L,EAAI,GAC1C3B,EAAQE,EAASyB,GAAIO,EAAY1X,GAAI4X,EAAoBjM,IACzDvL,EAAQsV,EAASyB,GAAInY,EAAQ4Y,SAKzCxX,EAAQlB,EAAMF,EAAQ0W,IAIlCpN,iBAAWoN,EAASU,SACpBzO,KAAMgE,GAAWA,EAAQ0K,YACzB5O,SAAUkE,GAAWA,EAAQlE,UAAY,eAajD,SAAS4G,EAAMoJ,EAAKhC,EAAU9J,OACpB4L,EAAU,UAChBrX,EAASuX,EAAKhC,GAAU,SAAUvW,GAC9BqY,EAAQ/Q,KAAKtH,KACdyM,GACI4L,EAQX,SAAS9L,EAAMgK,UACJoC,EAAOpM,MAAMgK,GAUxB,SAASqC,EAAML,EAAKhC,EAAU9J,UACnB0C,EAAMoJ,EAAKhM,EAAMgK,GAAW9J,GAGvCmM,EAAMrM,MAAQA,EACdqM,EAAMzJ,MAAQA,EACdyJ,EAAM5X,SAAWA,EACjB4X,EAAMtC,QAAUA,EAChBsC,EAAMA,MAAQA"} \ No newline at end of file +{"version":3,"file":"esquery.esm.min.js","sources":["../node_modules/estraverse/estraverse.js","../parser.js","../esquery.js"],"sourcesContent":["/*\n Copyright (C) 2012-2013 Yusuke Suzuki \n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[>\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c102(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @typedef {function} SelectorMatcher\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false;\n \n const name = selector.name.toLowerCase();\n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","ss","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","m","succeedingAncestry","parser","query","matches"],"mappings":"u0DA2BC,SAASA,EAAMC,GAGZ,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,EAASC,GACd,IAAcC,EAAKC,EAAfC,EAAM,GACV,IAAKF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,GAIvB,OAAOC,EAgMX,SAASE,EAAUC,EAAQL,GACvBM,KAAKD,OAASA,EACdC,KAAKN,IAAMA,EAiBf,SAASO,EAAQC,EAAMC,EAAMC,EAAMC,GAC/BL,KAAKE,KAAOA,EACZF,KAAKG,KAAOA,EACZH,KAAKI,KAAOA,EACZJ,KAAKK,IAAMA,EAGf,SAASC,KAuHT,SAASC,EAAOL,GACZ,OAAY,MAARA,IAGmB,iBAATA,GAA0C,iBAAdA,EAAKM,MAGnD,SAASC,EAAWC,EAAUhB,GAC1B,OAAQgB,IAAaxB,EAAOyB,kBAAoBD,IAAaxB,EAAO0B,gBAAkB,eAAiBlB,EAG3G,SAASmB,EAA2BC,EAAWC,GAC3C,IAAK,IAAIC,EAAIF,EAAUG,OAAS,EAAGD,GAAK,IAAKA,EACzC,GAAIF,EAAUE,GAAGd,OAASa,EACtB,OAAO,EAGf,OAAO,EAwQX,SAASG,EAASC,EAAMC,GAEpB,OADiB,IAAId,GACHY,SAASC,EAAMC,GAQrC,SAASC,EAAmBC,EAASC,GACjC,IAAIC,EAiBJ,OAfAA,EAjnBJ,SAAoBC,EAAOC,GACvB,IAAIC,EAAMC,EAAKZ,EAAGa,EAKlB,IAHAD,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,GAAkB+W,EAASU,QAAQzX,GACnC0W,EAAQvW,EAAM4W,EAAUjK,GACxB,GAAI6L,EAAYzX,OACZ,IAAK,IAAID,EAAI,EAAG2W,EAAIe,EAAYzX,OAAQD,EAAI2W,IAAK3W,EAAG,CAC5C0X,EAAY1X,GAAGd,EAAM4W,EAAUjK,IAC/BzL,EAAQlB,EAAMH,EAAQ+W,GAE1B,IAAK,IAAIO,EAAI,EAAGyB,EAAIhC,EAAS7V,OAAQoW,EAAIyB,IAAKzB,EAAG,CAC7C,IAAM0B,EAAqBjC,EAASxK,MAAM+K,EAAI,GAC1CqB,EAAY1X,GAAG8V,EAASO,GAAI0B,EAAoBlM,IAChDzL,EAAQ0V,EAASO,GAAItX,EAAQgZ,SAKzC3X,EAAQlB,EAAMH,EAAQ+W,IAIlCvN,iBAAWuN,EAASW,SACpB7O,KAAMiE,GAAWA,EAAQ6K,YACzBhP,SAAUmE,GAAWA,EAAQnE,UAAY,eAajD,SAAS6G,EAAMkJ,EAAKjC,EAAU3J,GAC1B,IAAM+L,EAAU,GAIhB,OAHA1X,EAASuX,EAAKjC,GAAU,SAAUtW,GAC9B0Y,EAAQnR,KAAKvH,KACd2M,GACI+L,EAQX,SAASjM,EAAM6J,GACX,OAAOwC,EAAOrM,MAAM6J,GAUxB,SAASyC,EAAMR,EAAKjC,EAAU3J,GAC1B,OAAO0C,EAAMkJ,EAAK9L,EAAM6J,GAAW3J,GAGvCoM,EAAMtM,MAAQA,EACdsM,EAAM1J,MAAQA,EACd0J,EAAM/X,SAAWA,EACjB+X,EAAMC,QAvPN,SAAiBhZ,EAAMsW,EAAUM,EAAUjK,GACvC,OAAK2J,KACAtW,IACA4W,IAAYA,EAAW,IAErBP,EAAWC,EAAXD,CAAqBrW,EAAM4W,EAAUjK,KAmPhDoM,EAAMA,MAAQA"} \ No newline at end of file diff --git a/node_modules/esquery/dist/esquery.js b/node_modules/esquery/dist/esquery.js index adc2a5ed6..f303a2b49 100644 --- a/node_modules/esquery/dist/esquery.js +++ b/node_modules/esquery/dist/esquery.js @@ -4,69 +4,57 @@ (global = global || self, global.esquery = factory()); }(this, (function () { 'use strict'; + function _iterableToArrayLimit(arr, i) { + var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; + if (null != _i) { + var _s, + _e, + _x, + _r, + _arr = [], + _n = !0, + _d = !1; + try { + if (_x = (_i = _i.call(arr)).next, 0 === i) { + if (Object(_i) !== _i) return; + _n = !1; + } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); + } catch (err) { + _d = !0, _e = err; + } finally { + try { + if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + } finally { + if (_d) throw _e; + } + } + return _arr; + } + } function _typeof(obj) { "@babel/helpers - typeof"; - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); } - function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); - } - - function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); @@ -75,80 +63,18 @@ if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; } - function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { @@ -180,25 +106,19 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /*jslint vars:false, bitwise:true*/ - /*jshint indent:4*/ - /*global exports:true*/ (function clone(exports) { var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE; - function deepCopy(obj) { var ret = {}, - key, - val; - + key, + val; for (key in obj) { if (obj.hasOwnProperty(key)) { val = obj[key]; - if (typeof val === 'object' && val !== null) { ret[key] = deepCopy(val); } else { @@ -206,21 +126,19 @@ } } } - return ret; - } // based on LLVM libc++ upper_bound / lower_bound - // MIT License + } + // based on LLVM libc++ upper_bound / lower_bound + // MIT License function upperBound(array, func) { var diff, len, i, current; len = array.length; i = 0; - while (len) { diff = len >>> 1; current = i + diff; - if (func(array[current])) { len = diff; } else { @@ -228,10 +146,8 @@ len -= diff + 1; } } - return i; } - Syntax = { AssignmentExpression: 'AssignmentExpression', AssignmentPattern: 'AssignmentPattern', @@ -288,8 +204,10 @@ NewExpression: 'NewExpression', ObjectExpression: 'ObjectExpression', ObjectPattern: 'ObjectPattern', + PrivateIdentifier: 'PrivateIdentifier', Program: 'Program', Property: 'Property', + PropertyDefinition: 'PropertyDefinition', RestElement: 'RestElement', ReturnStatement: 'ReturnStatement', SequenceExpression: 'SequenceExpression', @@ -367,8 +285,10 @@ NewExpression: ['callee', 'arguments'], ObjectExpression: ['properties'], ObjectPattern: ['properties'], + PrivateIdentifier: [], Program: ['body'], Property: ['key', 'value'], + PropertyDefinition: ['key', 'value'], RestElement: ['argument'], ReturnStatement: ['argument'], SequenceExpression: ['expressions'], @@ -389,8 +309,9 @@ WhileStatement: ['test', 'body'], WithStatement: ['object', 'body'], YieldExpression: ['argument'] - }; // unique id + }; + // unique id BREAK = {}; SKIP = {}; REMOVE = {}; @@ -399,16 +320,13 @@ Skip: SKIP, Remove: REMOVE }; - function Reference(parent, key) { this.parent = parent; this.key = key; } - Reference.prototype.replace = function replace(node) { this.parent[this.key] = node; }; - Reference.prototype.remove = function remove() { if (Array.isArray(this.parent)) { this.parent.splice(this.key, 1); @@ -418,21 +336,18 @@ return false; } }; - function Element(node, path, wrap, ref) { this.node = node; this.path = path; this.wrap = wrap; this.ref = ref; } + function Controller() {} - function Controller() {} // API: + // API: // return property path array from root to current node - - Controller.prototype.path = function path() { var i, iz, j, jz, result, element; - function addToPath(result, path) { if (Array.isArray(path)) { for (j = 0, jz = path.length; j < jz; ++j) { @@ -441,91 +356,84 @@ } else { result.push(path); } - } // root node - + } + // root node if (!this.__current.path) { return null; - } // first node is sentinel, second node is root element - + } + // first node is sentinel, second node is root element result = []; - for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { element = this.__leavelist[i]; addToPath(result, element.path); } - addToPath(result, this.__current.path); return result; - }; // API: - // return type of current node - + }; + // API: + // return type of current node Controller.prototype.type = function () { var node = this.current(); return node.type || this.__current.wrap; - }; // API: - // return array of parent elements - + }; + // API: + // return array of parent elements Controller.prototype.parents = function parents() { - var i, iz, result; // first node is sentinel + var i, iz, result; + // first node is sentinel result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { result.push(this.__leavelist[i].node); } - return result; - }; // API: - // return current node - + }; + // API: + // return current node Controller.prototype.current = function current() { return this.__current.node; }; - Controller.prototype.__execute = function __execute(callback, element) { var previous, result; result = undefined; previous = this.__current; this.__current = element; this.__state = null; - if (callback) { result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); } - this.__current = previous; return result; - }; // API: - // notify control skip / break - + }; + // API: + // notify control skip / break Controller.prototype.notify = function notify(flag) { this.__state = flag; - }; // API: - // skip child nodes of current node - + }; + // API: + // skip child nodes of current node Controller.prototype.skip = function () { this.notify(SKIP); - }; // API: - // break traversals - + }; + // API: + // break traversals Controller.prototype['break'] = function () { this.notify(BREAK); - }; // API: - // remove node - + }; + // API: + // remove node Controller.prototype.remove = function () { this.notify(REMOVE); }; - Controller.prototype.__initialize = function (root, visitor) { this.visitor = visitor; this.root = root; @@ -534,87 +442,68 @@ this.__current = null; this.__state = null; this.__fallback = null; - if (visitor.fallback === 'iteration') { this.__fallback = Object.keys; } else if (typeof visitor.fallback === 'function') { this.__fallback = visitor.fallback; } - this.__keys = VisitorKeys; - if (visitor.keys) { this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); } }; - function isNode(node) { if (node == null) { return false; } - return typeof node === 'object' && typeof node.type === 'string'; } - function isProperty(nodeType, key) { return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; } - function candidateExistsInLeaveList(leavelist, candidate) { for (var i = leavelist.length - 1; i >= 0; --i) { if (leavelist[i].node === candidate) { return true; } } - return false; } - Controller.prototype.traverse = function traverse(root, visitor) { var worklist, leavelist, element, node, nodeType, ret, key, current, current2, candidates, candidate, sentinel; - this.__initialize(root, visitor); + sentinel = {}; - sentinel = {}; // reference - + // reference worklist = this.__worklist; - leavelist = this.__leavelist; // initialize + leavelist = this.__leavelist; + // initialize worklist.push(new Element(root, null, null, null)); leavelist.push(new Element(null, null, null, null)); - while (worklist.length) { element = worklist.pop(); - if (element === sentinel) { element = leavelist.pop(); ret = this.__execute(visitor.leave, element); - if (this.__state === BREAK || ret === BREAK) { return; } - continue; } - if (element.node) { ret = this.__execute(visitor.enter, element); - if (this.__state === BREAK || ret === BREAK) { return; } - worklist.push(sentinel); leavelist.push(element); - if (this.__state === SKIP || ret === SKIP) { continue; } - node = element.node; nodeType = node.type || element.wrap; candidates = this.__keys[nodeType]; - if (!candidates) { if (this.__fallback) { candidates = this.__fallback(node); @@ -622,29 +511,22 @@ throw new Error('Unknown node type ' + nodeType + '.'); } } - current = candidates.length; - while ((current -= 1) >= 0) { key = candidates[current]; candidate = node[key]; - if (!candidate) { continue; } - if (Array.isArray(candidate)) { current2 = candidate.length; - while ((current2 -= 1) >= 0) { if (!candidate[current2]) { continue; } - if (candidateExistsInLeaveList(leavelist, candidate[current2])) { continue; } - if (isProperty(nodeType, candidates[current])) { element = new Element(candidate[current2], [key, current2], 'Property', null); } else if (isNode(candidate[current2])) { @@ -652,121 +534,103 @@ } else { continue; } - worklist.push(element); } } else if (isNode(candidate)) { if (candidateExistsInLeaveList(leavelist, candidate)) { continue; } - worklist.push(new Element(candidate, key, null, null)); } } } } }; - Controller.prototype.replace = function replace(root, visitor) { var worklist, leavelist, node, nodeType, target, element, current, current2, candidates, candidate, sentinel, outer, key; - function removeElem(element) { var i, key, nextElem, parent; - if (element.ref.remove()) { // When the reference is an element of an array. key = element.ref.key; - parent = element.ref.parent; // If removed from array, then decrease following items' keys. + parent = element.ref.parent; + // If removed from array, then decrease following items' keys. i = worklist.length; - while (i--) { nextElem = worklist[i]; - if (nextElem.ref && nextElem.ref.parent === parent) { if (nextElem.ref.key < key) { break; } - --nextElem.ref.key; } } } } - this.__initialize(root, visitor); + sentinel = {}; - sentinel = {}; // reference - + // reference worklist = this.__worklist; - leavelist = this.__leavelist; // initialize + leavelist = this.__leavelist; + // initialize outer = { root: root }; element = new Element(root, null, null, new Reference(outer, 'root')); worklist.push(element); leavelist.push(element); - while (worklist.length) { element = worklist.pop(); - if (element === sentinel) { element = leavelist.pop(); - target = this.__execute(visitor.leave, element); // node may be replaced with null, - // so distinguish between undefined and null in this place + target = this.__execute(visitor.leave, element); + // node may be replaced with null, + // so distinguish between undefined and null in this place if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { // replace element.ref.replace(target); } - if (this.__state === REMOVE || target === REMOVE) { removeElem(element); } - if (this.__state === BREAK || target === BREAK) { return outer.root; } - continue; } + target = this.__execute(visitor.enter, element); - target = this.__execute(visitor.enter, element); // node may be replaced with null, + // node may be replaced with null, // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { // replace element.ref.replace(target); element.node = target; } - if (this.__state === REMOVE || target === REMOVE) { removeElem(element); element.node = null; } - if (this.__state === BREAK || target === BREAK) { return outer.root; - } // node may be null - + } + // node may be null node = element.node; - if (!node) { continue; } - worklist.push(sentinel); leavelist.push(element); - if (this.__state === SKIP || target === SKIP) { continue; } - nodeType = node.type || element.wrap; candidates = this.__keys[nodeType]; - if (!candidates) { if (this.__fallback) { candidates = this.__fallback(node); @@ -774,25 +638,19 @@ throw new Error('Unknown node type ' + nodeType + '.'); } } - current = candidates.length; - while ((current -= 1) >= 0) { key = candidates[current]; candidate = node[key]; - if (!candidate) { continue; } - if (Array.isArray(candidate)) { current2 = candidate.length; - while ((current2 -= 1) >= 0) { if (!candidate[current2]) { continue; } - if (isProperty(nodeType, candidates[current])) { element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); } else if (isNode(candidate[current2])) { @@ -800,7 +658,6 @@ } else { continue; } - worklist.push(element); } } else if (isNode(candidate)) { @@ -808,53 +665,43 @@ } } } - return outer.root; }; - function traverse(root, visitor) { var controller = new Controller(); return controller.traverse(root, visitor); } - function replace(root, visitor) { var controller = new Controller(); return controller.replace(root, visitor); } - function extendCommentRange(comment, tokens) { var target; target = upperBound(tokens, function search(token) { return token.range[0] > comment.range[0]; }); comment.extendedRange = [comment.range[0], comment.range[1]]; - if (target !== tokens.length) { comment.extendedRange[1] = tokens[target].range[0]; } - target -= 1; - if (target >= 0) { comment.extendedRange[0] = tokens[target].range[1]; } - return comment; } - function attachComments(tree, providedComments, tokens) { // At first, we should calculate extended comment ranges. var comments = [], - comment, - len, - i, - cursor; - + comment, + len, + i, + cursor; if (!tree.range) { throw new Error('attachComments needs range information'); - } // tokens array is empty, we attach comments to tree as 'leadingComments' - + } + // tokens array is empty, we attach comments to tree as 'leadingComments' if (!tokens.length) { if (providedComments.length) { for (i = 0, len = providedComments.length; i < len; i += 1) { @@ -862,47 +709,39 @@ comment.extendedRange = [0, tree.range[0]]; comments.push(comment); } - tree.leadingComments = comments; } - return tree; } - for (i = 0, len = providedComments.length; i < len; i += 1) { comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } // This is based on John Freeman's implementation. - + } + // This is based on John Freeman's implementation. cursor = 0; traverse(tree, { enter: function (node) { var comment; - while (cursor < comments.length) { comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { break; } - if (comment.extendedRange[1] === node.range[0]) { if (!node.leadingComments) { node.leadingComments = []; } - node.leadingComments.push(comment); comments.splice(cursor, 1); } else { cursor += 1; } - } // already out of owned node - + } + // already out of owned node if (cursor === comments.length) { return VisitorOption.Break; } - if (comments[cursor].extendedRange[0] > node.range[1]) { return VisitorOption.Skip; } @@ -912,31 +751,26 @@ traverse(tree, { leave: function (node) { var comment; - while (cursor < comments.length) { comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { break; } - if (node.range[1] === comment.extendedRange[0]) { if (!node.trailingComments) { node.trailingComments = []; } - node.trailingComments.push(comment); comments.splice(cursor, 1); } else { cursor += 1; } - } // already out of owned node - + } + // already out of owned node if (cursor === comments.length) { return VisitorOption.Break; } - if (comments[cursor].extendedRange[0] > node.range[1]) { return VisitorOption.Skip; } @@ -944,7 +778,6 @@ }); return tree; } - exports.Syntax = Syntax; exports.traverse = traverse; exports.replace = replace; @@ -952,15 +785,12 @@ exports.VisitorKeys = VisitorKeys; exports.VisitorOption = VisitorOption; exports.Controller = Controller; - exports.cloneEnvironment = function () { return clone({}); }; - return exports; })(exports); /* vim: set sw=4 ts=4 et tw=80 : */ - }); var parser = createCommonjsModule(function (module) { @@ -979,25 +809,20 @@ function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; child.prototype = new ctor(); } - function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; - if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } - peg$subclass(peg$SyntaxError, Error); - peg$SyntaxError.buildMessage = function (expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function literal(expectation) { @@ -1005,12 +830,10 @@ }, "class": function _class(expectation) { var escapedParts = "", - i; - + i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } - return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function any(expectation) { @@ -1023,11 +846,9 @@ return expectation.description; } }; - function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } - function literalEscape(s) { return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); @@ -1035,7 +856,6 @@ return '\\x' + hex(ch); }); } - function classEscape(s) { return s.replace(/\\/g, '\\\\').replace(/\]/g, '\\]').replace(/\^/g, '\\^').replace(/-/g, '\\-').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); @@ -1043,22 +863,17 @@ return '\\x' + hex(ch); }); } - function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } - function describeExpected(expected) { var descriptions = new Array(expected.length), - i, - j; - + i, + j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } - descriptions.sort(); - if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { @@ -1066,296 +881,275 @@ j++; } } - descriptions.length = j; } - switch (descriptions.length) { case 1: return descriptions[0]; - case 2: return descriptions[0] + " or " + descriptions[1]; - default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } - function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; - function peg$parse(input, options) { options = options !== void 0 ? options : {}; - var peg$FAILED = {}, - peg$startRuleFunctions = { - start: peg$parsestart - }, - peg$startRuleFunction = peg$parsestart, - peg$c0 = function peg$c0(ss) { - return ss.length === 1 ? ss[0] : { - type: 'matches', - selectors: ss - }; - }, - peg$c1 = function peg$c1() { - return void 0; - }, - peg$c2 = " ", - peg$c3 = peg$literalExpectation(" ", false), - peg$c4 = /^[^ [\],():#!=><~+.]/, - peg$c5 = peg$classExpectation([" ", "[", "]", ",", "(", ")", ":", "#", "!", "=", ">", "<", "~", "+", "."], true, false), - peg$c6 = function peg$c6(i) { - return i.join(''); - }, - peg$c7 = ">", - peg$c8 = peg$literalExpectation(">", false), - peg$c9 = function peg$c9() { - return 'child'; - }, - peg$c10 = "~", - peg$c11 = peg$literalExpectation("~", false), - peg$c12 = function peg$c12() { - return 'sibling'; - }, - peg$c13 = "+", - peg$c14 = peg$literalExpectation("+", false), - peg$c15 = function peg$c15() { - return 'adjacent'; - }, - peg$c16 = function peg$c16() { - return 'descendant'; - }, - peg$c17 = ",", - peg$c18 = peg$literalExpectation(",", false), - peg$c19 = function peg$c19(s, ss) { - return [s].concat(ss.map(function (s) { - return s[3]; - })); - }, - peg$c20 = function peg$c20(a, ops) { - return ops.reduce(function (memo, rhs) { - return { - type: rhs[0], - left: memo, - right: rhs[1] + peg$startRuleFunctions = { + start: peg$parsestart + }, + peg$startRuleFunction = peg$parsestart, + peg$c0 = function peg$c0(ss) { + return ss.length === 1 ? ss[0] : { + type: 'matches', + selectors: ss }; - }, a); - }, - peg$c21 = "!", - peg$c22 = peg$literalExpectation("!", false), - peg$c23 = function peg$c23(subject, as) { - var b = as.length === 1 ? as[0] : { - type: 'compound', - selectors: as - }; - if (subject) b.subject = true; - return b; - }, - peg$c24 = "*", - peg$c25 = peg$literalExpectation("*", false), - peg$c26 = function peg$c26(a) { - return { - type: 'wildcard', - value: a - }; - }, - peg$c27 = "#", - peg$c28 = peg$literalExpectation("#", false), - peg$c29 = function peg$c29(i) { - return { - type: 'identifier', - value: i - }; - }, - peg$c30 = "[", - peg$c31 = peg$literalExpectation("[", false), - peg$c32 = "]", - peg$c33 = peg$literalExpectation("]", false), - peg$c34 = function peg$c34(v) { - return v; - }, - peg$c35 = /^[>", "<", "!"], false, false), - peg$c37 = "=", - peg$c38 = peg$literalExpectation("=", false), - peg$c39 = function peg$c39(a) { - return (a || '') + '='; - }, - peg$c40 = /^[><]/, - peg$c41 = peg$classExpectation([">", "<"], false, false), - peg$c42 = ".", - peg$c43 = peg$literalExpectation(".", false), - peg$c44 = function peg$c44(a, as) { - return [].concat.apply([a], as).join(''); - }, - peg$c45 = function peg$c45(name, op, value) { - return { - type: 'attribute', - name: name, - operator: op, - value: value - }; - }, - peg$c46 = function peg$c46(name) { - return { - type: 'attribute', - name: name - }; - }, - peg$c47 = "\"", - peg$c48 = peg$literalExpectation("\"", false), - peg$c49 = /^[^\\"]/, - peg$c50 = peg$classExpectation(["\\", "\""], true, false), - peg$c51 = "\\", - peg$c52 = peg$literalExpectation("\\", false), - peg$c53 = peg$anyExpectation(), - peg$c54 = function peg$c54(a, b) { - return a + b; - }, - peg$c55 = function peg$c55(d) { - return { - type: 'literal', - value: strUnescape(d.join('')) - }; - }, - peg$c56 = "'", - peg$c57 = peg$literalExpectation("'", false), - peg$c58 = /^[^\\']/, - peg$c59 = peg$classExpectation(["\\", "'"], true, false), - peg$c60 = /^[0-9]/, - peg$c61 = peg$classExpectation([["0", "9"]], false, false), - peg$c62 = function peg$c62(a, b) { - // Can use `a.flat().join('')` once supported - var leadingDecimals = a ? [].concat.apply([], a).join('') : ''; - return { - type: 'literal', - value: parseFloat(leadingDecimals + b.join('')) - }; - }, - peg$c63 = function peg$c63(i) { - return { - type: 'literal', - value: i - }; - }, - peg$c64 = "type(", - peg$c65 = peg$literalExpectation("type(", false), - peg$c66 = /^[^ )]/, - peg$c67 = peg$classExpectation([" ", ")"], true, false), - peg$c68 = ")", - peg$c69 = peg$literalExpectation(")", false), - peg$c70 = function peg$c70(t) { - return { - type: 'type', - value: t.join('') - }; - }, - peg$c71 = /^[imsu]/, - peg$c72 = peg$classExpectation(["i", "m", "s", "u"], false, false), - peg$c73 = "/", - peg$c74 = peg$literalExpectation("/", false), - peg$c75 = /^[^\/]/, - peg$c76 = peg$classExpectation(["/"], true, false), - peg$c77 = function peg$c77(d, flgs) { - return { - type: 'regexp', - value: new RegExp(d.join(''), flgs ? flgs.join('') : '') - }; - }, - peg$c78 = function peg$c78(i, is) { - return { - type: 'field', - name: is.reduce(function (memo, p) { - return memo + p[0] + p[1]; - }, i) - }; - }, - peg$c79 = ":not(", - peg$c80 = peg$literalExpectation(":not(", false), - peg$c81 = function peg$c81(ss) { - return { - type: 'not', - selectors: ss - }; - }, - peg$c82 = ":matches(", - peg$c83 = peg$literalExpectation(":matches(", false), - peg$c84 = function peg$c84(ss) { - return { - type: 'matches', - selectors: ss - }; - }, - peg$c85 = ":has(", - peg$c86 = peg$literalExpectation(":has(", false), - peg$c87 = function peg$c87(ss) { - return { - type: 'has', - selectors: ss - }; - }, - peg$c88 = ":first-child", - peg$c89 = peg$literalExpectation(":first-child", false), - peg$c90 = function peg$c90() { - return nth(1); - }, - peg$c91 = ":last-child", - peg$c92 = peg$literalExpectation(":last-child", false), - peg$c93 = function peg$c93() { - return nthLast(1); - }, - peg$c94 = ":nth-child(", - peg$c95 = peg$literalExpectation(":nth-child(", false), - peg$c96 = function peg$c96(n) { - return nth(parseInt(n.join(''), 10)); - }, - peg$c97 = ":nth-last-child(", - peg$c98 = peg$literalExpectation(":nth-last-child(", false), - peg$c99 = function peg$c99(n) { - return nthLast(parseInt(n.join(''), 10)); - }, - peg$c100 = ":", - peg$c101 = peg$literalExpectation(":", false), - peg$c102 = "statement", - peg$c103 = peg$literalExpectation("statement", true), - peg$c104 = "expression", - peg$c105 = peg$literalExpectation("expression", true), - peg$c106 = "declaration", - peg$c107 = peg$literalExpectation("declaration", true), - peg$c108 = "function", - peg$c109 = peg$literalExpectation("function", true), - peg$c110 = "pattern", - peg$c111 = peg$literalExpectation("pattern", true), - peg$c112 = function peg$c112(c) { - return { - type: 'class', - name: c - }; - }, - peg$currPos = 0, - peg$posDetailsCache = [{ - line: 1, - column: 1 - }], - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$resultsCache = {}, - peg$result; - + }, + peg$c1 = function peg$c1() { + return void 0; + }, + peg$c2 = " ", + peg$c3 = peg$literalExpectation(" ", false), + peg$c4 = /^[^ [\],():#!=><~+.]/, + peg$c5 = peg$classExpectation([" ", "[", "]", ",", "(", ")", ":", "#", "!", "=", ">", "<", "~", "+", "."], true, false), + peg$c6 = function peg$c6(i) { + return i.join(''); + }, + peg$c7 = ">", + peg$c8 = peg$literalExpectation(">", false), + peg$c9 = function peg$c9() { + return 'child'; + }, + peg$c10 = "~", + peg$c11 = peg$literalExpectation("~", false), + peg$c12 = function peg$c12() { + return 'sibling'; + }, + peg$c13 = "+", + peg$c14 = peg$literalExpectation("+", false), + peg$c15 = function peg$c15() { + return 'adjacent'; + }, + peg$c16 = function peg$c16() { + return 'descendant'; + }, + peg$c17 = ",", + peg$c18 = peg$literalExpectation(",", false), + peg$c19 = function peg$c19(s, ss) { + return [s].concat(ss.map(function (s) { + return s[3]; + })); + }, + peg$c20 = function peg$c20(a, ops) { + return ops.reduce(function (memo, rhs) { + return { + type: rhs[0], + left: memo, + right: rhs[1] + }; + }, a); + }, + peg$c21 = "!", + peg$c22 = peg$literalExpectation("!", false), + peg$c23 = function peg$c23(subject, as) { + var b = as.length === 1 ? as[0] : { + type: 'compound', + selectors: as + }; + if (subject) b.subject = true; + return b; + }, + peg$c24 = "*", + peg$c25 = peg$literalExpectation("*", false), + peg$c26 = function peg$c26(a) { + return { + type: 'wildcard', + value: a + }; + }, + peg$c27 = "#", + peg$c28 = peg$literalExpectation("#", false), + peg$c29 = function peg$c29(i) { + return { + type: 'identifier', + value: i + }; + }, + peg$c30 = "[", + peg$c31 = peg$literalExpectation("[", false), + peg$c32 = "]", + peg$c33 = peg$literalExpectation("]", false), + peg$c34 = function peg$c34(v) { + return v; + }, + peg$c35 = /^[>", "<", "!"], false, false), + peg$c37 = "=", + peg$c38 = peg$literalExpectation("=", false), + peg$c39 = function peg$c39(a) { + return (a || '') + '='; + }, + peg$c40 = /^[><]/, + peg$c41 = peg$classExpectation([">", "<"], false, false), + peg$c42 = ".", + peg$c43 = peg$literalExpectation(".", false), + peg$c44 = function peg$c44(a, as) { + return [].concat.apply([a], as).join(''); + }, + peg$c45 = function peg$c45(name, op, value) { + return { + type: 'attribute', + name: name, + operator: op, + value: value + }; + }, + peg$c46 = function peg$c46(name) { + return { + type: 'attribute', + name: name + }; + }, + peg$c47 = "\"", + peg$c48 = peg$literalExpectation("\"", false), + peg$c49 = /^[^\\"]/, + peg$c50 = peg$classExpectation(["\\", "\""], true, false), + peg$c51 = "\\", + peg$c52 = peg$literalExpectation("\\", false), + peg$c53 = peg$anyExpectation(), + peg$c54 = function peg$c54(a, b) { + return a + b; + }, + peg$c55 = function peg$c55(d) { + return { + type: 'literal', + value: strUnescape(d.join('')) + }; + }, + peg$c56 = "'", + peg$c57 = peg$literalExpectation("'", false), + peg$c58 = /^[^\\']/, + peg$c59 = peg$classExpectation(["\\", "'"], true, false), + peg$c60 = /^[0-9]/, + peg$c61 = peg$classExpectation([["0", "9"]], false, false), + peg$c62 = function peg$c62(a, b) { + // Can use `a.flat().join('')` once supported + var leadingDecimals = a ? [].concat.apply([], a).join('') : ''; + return { + type: 'literal', + value: parseFloat(leadingDecimals + b.join('')) + }; + }, + peg$c63 = function peg$c63(i) { + return { + type: 'literal', + value: i + }; + }, + peg$c64 = "type(", + peg$c65 = peg$literalExpectation("type(", false), + peg$c66 = /^[^ )]/, + peg$c67 = peg$classExpectation([" ", ")"], true, false), + peg$c68 = ")", + peg$c69 = peg$literalExpectation(")", false), + peg$c70 = function peg$c70(t) { + return { + type: 'type', + value: t.join('') + }; + }, + peg$c71 = /^[imsu]/, + peg$c72 = peg$classExpectation(["i", "m", "s", "u"], false, false), + peg$c73 = "/", + peg$c74 = peg$literalExpectation("/", false), + peg$c75 = /^[^\/]/, + peg$c76 = peg$classExpectation(["/"], true, false), + peg$c77 = function peg$c77(d, flgs) { + return { + type: 'regexp', + value: new RegExp(d.join(''), flgs ? flgs.join('') : '') + }; + }, + peg$c78 = function peg$c78(i, is) { + return { + type: 'field', + name: is.reduce(function (memo, p) { + return memo + p[0] + p[1]; + }, i) + }; + }, + peg$c79 = ":not(", + peg$c80 = peg$literalExpectation(":not(", false), + peg$c81 = function peg$c81(ss) { + return { + type: 'not', + selectors: ss + }; + }, + peg$c82 = ":matches(", + peg$c83 = peg$literalExpectation(":matches(", false), + peg$c84 = function peg$c84(ss) { + return { + type: 'matches', + selectors: ss + }; + }, + peg$c85 = ":has(", + peg$c86 = peg$literalExpectation(":has(", false), + peg$c87 = function peg$c87(ss) { + return { + type: 'has', + selectors: ss + }; + }, + peg$c88 = ":first-child", + peg$c89 = peg$literalExpectation(":first-child", false), + peg$c90 = function peg$c90() { + return nth(1); + }, + peg$c91 = ":last-child", + peg$c92 = peg$literalExpectation(":last-child", false), + peg$c93 = function peg$c93() { + return nthLast(1); + }, + peg$c94 = ":nth-child(", + peg$c95 = peg$literalExpectation(":nth-child(", false), + peg$c96 = function peg$c96(n) { + return nth(parseInt(n.join(''), 10)); + }, + peg$c97 = ":nth-last-child(", + peg$c98 = peg$literalExpectation(":nth-last-child(", false), + peg$c99 = function peg$c99(n) { + return nthLast(parseInt(n.join(''), 10)); + }, + peg$c100 = ":", + peg$c101 = peg$literalExpectation(":", false), + peg$c102 = function peg$c102(c) { + return { + type: 'class', + name: c + }; + }, + peg$currPos = 0, + peg$posDetailsCache = [{ + line: 1, + column: 1 + }], + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$resultsCache = {}, + peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } - function peg$literalExpectation(text, ignoreCase) { return { type: "literal", @@ -1363,7 +1157,6 @@ ignoreCase: ignoreCase }; } - function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", @@ -1372,38 +1165,31 @@ ignoreCase: ignoreCase }; } - function peg$anyExpectation() { return { type: "any" }; } - function peg$endExpectation() { return { type: "end" }; } - function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], - p; - + p; if (details) { return details; } else { p = pos - 1; - while (!peg$posDetailsCache[p]) { p--; } - details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; - while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; @@ -1411,18 +1197,15 @@ } else { details.column++; } - p++; } - peg$posDetailsCache[pos] = details; return details; } } - function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), - endPosDetails = peg$computePosDetails(endPos); + endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, @@ -1436,43 +1219,33 @@ } }; } - function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } - if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } - peg$maxFailExpected.push(expected); } - function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); } - function peg$parsestart() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 0, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { s2 = peg$parseselectors(); - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c0(s2); s0 = s1; @@ -1488,104 +1261,83 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { s1 = peg$c1(); } - s0 = s1; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parse_() { var s0, s1; var key = peg$currPos * 30 + 1, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = []; - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } - while (s1 !== peg$FAILED) { s0.push(s1); - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseidentifierName() { var s0, s1, s2; var key = peg$currPos * 30 + 2, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = []; - if (peg$c4.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c5); } } - if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); - if (peg$c4.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c5); } @@ -1594,11 +1346,9 @@ } else { s1 = peg$FAILED; } - if (s1 !== peg$FAILED) { s1 = peg$c6(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -1606,35 +1356,28 @@ }; return s0; } - function peg$parsebinaryOp() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 3, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 62) { s2 = peg$c7; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c8); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c9(); s0 = s1; @@ -1650,26 +1393,21 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 126) { s2 = peg$c10; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c11); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c12(); s0 = s1; @@ -1685,26 +1423,21 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { s2 = peg$c13; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c14); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c15(); s0 = s1; @@ -1720,24 +1453,19 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s1 = peg$c16(); s0 = s1; @@ -1752,50 +1480,40 @@ } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; var key = peg$currPos * 30 + 4, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseselector(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s5 = peg$c17; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c18); } } - if (s5 !== peg$FAILED) { s6 = peg$parse_(); - if (s6 !== peg$FAILED) { s7 = peg$parseselector(); - if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -1815,30 +1533,24 @@ peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s5 = peg$c17; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c18); } } - if (s5 !== peg$FAILED) { s6 = peg$parse_(); - if (s6 !== peg$FAILED) { s7 = peg$parseselector(); - if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -1859,7 +1571,6 @@ s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c19(s1, s2); s0 = s1; @@ -1871,35 +1582,28 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseselector() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 5, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parsesequence(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parsebinaryOp(); - if (s4 !== peg$FAILED) { s5 = peg$parsesequence(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1911,15 +1615,12 @@ peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parsebinaryOp(); - if (s4 !== peg$FAILED) { s5 = peg$parsesequence(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1932,7 +1633,6 @@ s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c20(s1, s2); s0 = s1; @@ -1944,45 +1644,36 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsesequence() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 6, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 33) { s1 = peg$c21; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c22); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseatom(); - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); @@ -1991,7 +1682,6 @@ } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { s1 = peg$c23(s1, s2); s0 = s1; @@ -2003,56 +1693,41 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseatom() { var s0; var key = peg$currPos * 30 + 7, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$parsewildcard(); - if (s0 === peg$FAILED) { s0 = peg$parseidentifier(); - if (s0 === peg$FAILED) { s0 = peg$parseattr(); - if (s0 === peg$FAILED) { s0 = peg$parsefield(); - if (s0 === peg$FAILED) { s0 = peg$parsenegation(); - if (s0 === peg$FAILED) { s0 = peg$parsematches(); - if (s0 === peg$FAILED) { s0 = peg$parsehas(); - if (s0 === peg$FAILED) { s0 = peg$parsefirstChild(); - if (s0 === peg$FAILED) { s0 = peg$parselastChild(); - if (s0 === peg$FAILED) { s0 = peg$parsenthChild(); - if (s0 === peg$FAILED) { s0 = peg$parsenthLastChild(); - if (s0 === peg$FAILED) { s0 = peg$parseclass(); } @@ -2066,41 +1741,33 @@ } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsewildcard() { var s0, s1; var key = peg$currPos * 30 + 8, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { s1 = peg$c24; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c25); } } - if (s1 !== peg$FAILED) { s1 = peg$c26(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -2108,37 +1775,29 @@ }; return s0; } - function peg$parseidentifier() { var s0, s1, s2; var key = peg$currPos * 30 + 9, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 35) { s1 = peg$c27; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c28); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); - if (s2 !== peg$FAILED) { s1 = peg$c29(s2); s0 = s1; @@ -2150,58 +1809,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattr() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 10, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { s1 = peg$c30; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c31); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrValue(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 93) { s5 = peg$c32; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c33); } } - if (s5 !== peg$FAILED) { s1 = peg$c34(s3); s0 = s1; @@ -2225,53 +1872,43 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrOps() { var s0, s1, s2; var key = peg$currPos * 30 + 11, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (peg$c35.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c36); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c37; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c38); } } - if (s2 !== peg$FAILED) { s1 = peg$c39(s1); s0 = s1; @@ -2283,66 +1920,54 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { if (peg$c40.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - { peg$fail(peg$c41); } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrEqOps() { var s0, s1, s2; var key = peg$currPos * 30 + 12, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 33) { s1 = peg$c21; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c22); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c37; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c38); } } - if (s2 !== peg$FAILED) { s1 = peg$c39(s1); s0 = s1; @@ -2354,45 +1979,36 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 13, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseidentifierName(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s4 = peg$c42; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s4 !== peg$FAILED) { s5 = peg$parseidentifierName(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -2404,25 +2020,20 @@ peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s4 = peg$c42; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s4 !== peg$FAILED) { s5 = peg$parseidentifierName(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -2435,7 +2046,6 @@ s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c44(s1, s2); s0 = s1; @@ -2447,43 +2057,33 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 14, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrEqOps(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { s5 = peg$parsetype(); - if (s5 === peg$FAILED) { s5 = peg$parseregex(); } - if (s5 !== peg$FAILED) { s1 = peg$c45(s1, s3, s5); s0 = s1; @@ -2507,31 +2107,23 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrOps(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { s5 = peg$parsestring(); - if (s5 === peg$FAILED) { s5 = peg$parsenumber(); - if (s5 === peg$FAILED) { s5 = peg$parsepath(); } } - if (s5 !== peg$FAILED) { s1 = peg$c45(s1, s3, s5); s0 = s1; @@ -2555,89 +2147,71 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s1 = peg$c46(s1); } - s0 = s1; } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsestring() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 15, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c47; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c48); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c49.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c50); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2650,47 +2224,38 @@ s3 = peg$FAILED; } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c49.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c50); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2704,19 +2269,16 @@ } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { s3 = peg$c47; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c48); } } - if (s3 !== peg$FAILED) { s1 = peg$c55(s2); s0 = s1; @@ -2732,61 +2294,49 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 39) { s1 = peg$c56; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c57); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c58.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c59); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2799,47 +2349,38 @@ s3 = peg$FAILED; } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c58.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c59); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2853,19 +2394,16 @@ } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { s3 = peg$c56; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c57); } } - if (s3 !== peg$FAILED) { s1 = peg$c55(s2); s0 = s1; @@ -2882,66 +2420,54 @@ s0 = peg$FAILED; } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenumber() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 16, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$currPos; s2 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { s3 = peg$c42; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s3 !== peg$FAILED) { s2 = [s2, s3]; s1 = s2; @@ -2953,35 +2479,28 @@ peg$currPos = s1; s1 = peg$FAILED; } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } @@ -2990,7 +2509,6 @@ } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { s1 = peg$c62(s1, s2); s0 = s1; @@ -3002,31 +2520,25 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsepath() { var s0, s1; var key = peg$currPos * 30 + 17, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseidentifierName(); - if (s1 !== peg$FAILED) { s1 = peg$c63(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -3034,57 +2546,45 @@ }; return s0; } - function peg$parsetype() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 18, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c64) { s1 = peg$c64; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c65); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c66.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c67); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c66.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c67); } @@ -3093,22 +2593,18 @@ } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c70(s3); s0 = s1; @@ -3132,47 +2628,38 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseflags() { var s0, s1; var key = peg$currPos * 30 + 19, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c72); } } - if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); - if (peg$c71.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c72); } @@ -3181,61 +2668,49 @@ } else { s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseregex() { var s0, s1, s2, s3, s4; var key = peg$currPos * 30 + 20, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 47) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c74); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c75.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c76); } } - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c75.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c76); } @@ -3244,26 +2719,21 @@ } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { s3 = peg$c73; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c74); } } - if (s3 !== peg$FAILED) { s4 = peg$parseflags(); - if (s4 === peg$FAILED) { s4 = null; } - if (s4 !== peg$FAILED) { s1 = peg$c77(s2, s4); s0 = s1; @@ -3283,58 +2753,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; var key = peg$currPos * 30 + 21, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s1 = peg$c42; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); - if (s2 !== peg$FAILED) { s3 = []; s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s5 = peg$c42; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s5 !== peg$FAILED) { s6 = peg$parseidentifierName(); - if (s6 !== peg$FAILED) { s5 = [s5, s6]; s4 = s5; @@ -3346,25 +2804,20 @@ peg$currPos = s4; s4 = peg$FAILED; } - while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s5 = peg$c42; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s5 !== peg$FAILED) { s6 = peg$parseidentifierName(); - if (s6 !== peg$FAILED) { s5 = [s5, s6]; s4 = s5; @@ -3377,7 +2830,6 @@ s4 = peg$FAILED; } } - if (s3 !== peg$FAILED) { s1 = peg$c78(s2, s3); s0 = s1; @@ -3393,58 +2845,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 22, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c79) { s1 = peg$c79; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c80); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c81(s3); s0 = s1; @@ -3468,58 +2908,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsematches() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 23, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c82) { s1 = peg$c82; peg$currPos += 9; } else { s1 = peg$FAILED; - { peg$fail(peg$c83); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c84(s3); s0 = s1; @@ -3543,58 +2971,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsehas() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 24, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c85) { s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c86); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c87(s3); s0 = s1; @@ -3618,41 +3034,33 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsefirstChild() { var s0, s1; var key = peg$currPos * 30 + 25, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c88) { s1 = peg$c88; peg$currPos += 12; } else { s1 = peg$FAILED; - { peg$fail(peg$c89); } } - if (s1 !== peg$FAILED) { s1 = peg$c90(); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -3660,34 +3068,27 @@ }; return s0; } - function peg$parselastChild() { var s0, s1; var key = peg$currPos * 30 + 26, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c91) { s1 = peg$c91; peg$currPos += 11; } else { s1 = peg$FAILED; - { peg$fail(peg$c92); } } - if (s1 !== peg$FAILED) { s1 = peg$c93(); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -3695,57 +3096,45 @@ }; return s0; } - function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 27, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c94) { s1 = peg$c94; peg$currPos += 11; } else { s1 = peg$FAILED; - { peg$fail(peg$c95); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } @@ -3754,22 +3143,18 @@ } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c96(s3); s0 = s1; @@ -3793,64 +3178,51 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 28, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c97) { s1 = peg$c97; peg$currPos += 16; } else { s1 = peg$FAILED; - { peg$fail(peg$c98); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } @@ -3859,22 +3231,18 @@ } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c99(s3); s0 = s1; @@ -3898,103 +3266,34 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseclass() { var s0, s1, s2; var key = peg$currPos * 30 + 29, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 58) { s1 = peg$c100; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c101); } } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) { - s2 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c103); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) { - s2 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c105); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) { - s2 = input.substr(peg$currPos, 11); - peg$currPos += 11; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c107); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) { - s2 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c109); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) { - s2 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c111); - } - } - } - } - } - } - + s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { - s1 = peg$c112(s2); + s1 = peg$c102(s2); s0 = s1; } else { peg$currPos = s0; @@ -4004,14 +3303,12 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function nth(n) { return { type: 'nth-child', @@ -4021,7 +3318,6 @@ } }; } - function nthLast(n) { return { type: 'nth-last-child', @@ -4031,47 +3327,36 @@ } }; } - function strUnescape(s) { return s.replace(/\\(.)/g, function (match, ch) { switch (ch) { case 'b': return '\b'; - case 'f': return '\f'; - case 'n': return '\n'; - case 'r': return '\r'; - case 't': return '\t'; - case 'v': return '\v'; - default: return ch; } }); } - peg$result = peg$startRuleFunction(); - if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } - throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); } } - return { SyntaxError: peg$SyntaxError, parse: peg$parse @@ -4079,20 +3364,13 @@ }); }); - function _objectEntries(obj) { - var entries = []; - var keys = Object.keys(obj); - - for (var k = 0; k < keys.length; k++) entries.push([keys[k], obj[keys[k]]]); - - return entries; - } /** * @typedef {"LEFT_SIDE"|"RIGHT_SIDE"} Side */ var LEFT_SIDE = 'LEFT_SIDE'; var RIGHT_SIDE = 'RIGHT_SIDE'; + /** * @external AST * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html @@ -4113,555 +3391,519 @@ * Get the value of a property which may be multiple levels down * in the object. * @param {?PlainObject} obj - * @param {string} key + * @param {string[]} keys * @returns {undefined|boolean|string|number|external:AST} */ - - function getPath(obj, key) { - var keys = key.split('.'); - - var _iterator = _createForOfIteratorHelper(keys), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var _key = _step.value; - - if (obj == null) { - return obj; - } - - obj = obj[_key]; + function getPath(obj, keys) { + for (var i = 0; i < keys.length; ++i) { + if (obj == null) { + return obj; } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); + obj = obj[keys[i]]; } - return obj; } + /** * Determine whether `node` can be reached by following `path`, * starting at `ancestor`. * @param {?external:AST} node * @param {?external:AST} ancestor * @param {string[]} path + * @param {Integer} fromPathIndex * @returns {boolean} */ - - - function inPath(node, ancestor, path) { - if (path.length === 0) { - return node === ancestor; - } - - if (ancestor == null) { - return false; - } - - var field = ancestor[path[0]]; - var remainingPath = path.slice(1); - - if (Array.isArray(field)) { - var _iterator2 = _createForOfIteratorHelper(field), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var component = _step2.value; - - if (inPath(node, component, remainingPath)) { + function inPath(node, ancestor, path, fromPathIndex) { + var current = ancestor; + for (var i = fromPathIndex; i < path.length; ++i) { + if (current == null) { + return false; + } + var field = current[path[i]]; + if (Array.isArray(field)) { + for (var k = 0; k < field.length; ++k) { + if (inPath(node, field[k], path, i + 1)) { return true; } } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); + return false; } - - return false; - } else { - return inPath(node, field, remainingPath); + current = field; } + return node === current; } + /** - * @callback TraverseOptionFallback - * @param {external:AST} node The given node. - * @returns {string[]} An array of visitor keys for the given node. - */ + * A generated matcher function for a selector. + * @typedef {function} SelectorMatcher + */ /** - * @typedef {object} ESQueryOptions - * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node. - * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes. - */ + * A WeakMap for holding cached matcher functions for selectors. + * @type {WeakMap} + */ + var MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap() : null; /** - * Given a `node` and its ancestors, determine if `node` is matched - * by `selector`. - * @param {?external:AST} node + * Look up a matcher function for `selector` in the cache. + * If it does not exist, generate it with `generateMatcher` and add it to the cache. + * In engines without WeakMap, the caching is skipped and matchers are generated with every call. * @param {?SelectorAST} selector - * @param {external:AST[]} [ancestry=[]] - * @param {ESQueryOptions} [options] - * @throws {Error} Unknowns (operator, class name, selector type, or - * selector value type) - * @returns {boolean} + * @returns {SelectorMatcher} */ - - - function matches(node, selector, ancestry, options) { - if (!selector) { - return true; - } - - if (!node) { - return false; + function getMatcher(selector) { + if (selector == null) { + return function () { + return true; + }; } - - if (!ancestry) { - ancestry = []; + if (MATCHER_CACHE != null) { + var matcher = MATCHER_CACHE.get(selector); + if (matcher != null) { + return matcher; + } + matcher = generateMatcher(selector); + MATCHER_CACHE.set(selector, matcher); + return matcher; } + return generateMatcher(selector); + } + /** + * Create a matcher function for `selector`, + * @param {?SelectorAST} selector + * @returns {SelectorMatcher} + */ + function generateMatcher(selector) { switch (selector.type) { case 'wildcard': - return true; - + return function () { + return true; + }; case 'identifier': - return selector.value.toLowerCase() === node.type.toLowerCase(); - + { + var value = selector.value.toLowerCase(); + return function (node, ancestry, options) { + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + return value === node[nodeTypeKey].toLowerCase(); + }; + } case 'field': { var path = selector.name.split('.'); - var ancestor = ancestry[path.length - 1]; - return inPath(node, ancestor, path); + return function (node, ancestry) { + var ancestor = ancestry[path.length - 1]; + return inPath(node, ancestor, path, 0); + }; } - case 'matches': - var _iterator3 = _createForOfIteratorHelper(selector.selectors), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var sel = _step3.value; - - if (matches(node, sel, ancestry, options)) { - return true; + { + var matchers = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < matchers.length; ++i) { + if (matchers[i](node, ancestry, options)) { + return true; + } } - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); + return false; + }; } - - return false; - case 'compound': - var _iterator4 = _createForOfIteratorHelper(selector.selectors), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var _sel = _step4.value; - - if (!matches(node, _sel, ancestry, options)) { - return false; + { + var _matchers = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < _matchers.length; ++i) { + if (!_matchers[i](node, ancestry, options)) { + return false; + } } - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); + return true; + }; } - - return true; - case 'not': - var _iterator5 = _createForOfIteratorHelper(selector.selectors), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var _sel2 = _step5.value; - - if (matches(node, _sel2, ancestry, options)) { - return false; + { + var _matchers2 = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < _matchers2.length; ++i) { + if (_matchers2[i](node, ancestry, options)) { + return false; + } } - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); + return true; + }; } - - return true; - case 'has': { - var _ret = function () { - var collector = []; - - var _iterator6 = _createForOfIteratorHelper(selector.selectors), - _step6; - - try { - var _loop = function _loop() { - var sel = _step6.value; - var a = []; - estraverse.traverse(node, { - enter: function enter(node, parent) { - if (parent != null) { - a.unshift(parent); - } - - if (matches(node, sel, a, options)) { - collector.push(node); - } - }, - leave: function leave() { - a.shift(); - }, - keys: options && options.visitorKeys, - fallback: options && options.fallback || 'iteration' - }); - }; - - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - _loop(); - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - - return { - v: collector.length !== 0 - }; - }(); - - if (_typeof(_ret) === "object") return _ret.v; + var _matchers3 = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + var result = false; + var a = []; + estraverse.traverse(node, { + enter: function enter(node, parent) { + if (parent != null) { + a.unshift(parent); + } + for (var i = 0; i < _matchers3.length; ++i) { + if (_matchers3[i](node, a, options)) { + result = true; + this["break"](); + return; + } + } + }, + leave: function leave() { + a.shift(); + }, + keys: options && options.visitorKeys, + fallback: options && options.fallback || 'iteration' + }); + return result; + }; } - case 'child': - if (matches(node, selector.right, ancestry, options)) { - return matches(ancestry[0], selector.left, ancestry.slice(1), options); + { + var left = getMatcher(selector.left); + var right = getMatcher(selector.right); + return function (node, ancestry, options) { + if (ancestry.length > 0 && right(node, ancestry, options)) { + return left(ancestry[0], ancestry.slice(1), options); + } + return false; + }; } - - return false; - case 'descendant': - if (matches(node, selector.right, ancestry, options)) { - for (var i = 0, l = ancestry.length; i < l; ++i) { - if (matches(ancestry[i], selector.left, ancestry.slice(i + 1), options)) { - return true; + { + var _left = getMatcher(selector.left); + var _right = getMatcher(selector.right); + return function (node, ancestry, options) { + if (_right(node, ancestry, options)) { + for (var i = 0, l = ancestry.length; i < l; ++i) { + if (_left(ancestry[i], ancestry.slice(i + 1), options)) { + return true; + } + } } - } + return false; + }; } - - return false; - case 'attribute': { - var p = getPath(node, selector.name); - + var _path = selector.name.split('.'); switch (selector.operator) { case void 0: - return p != null; - + return function (node) { + return getPath(node, _path) != null; + }; case '=': switch (selector.value.type) { case 'regexp': - return typeof p === 'string' && selector.value.value.test(p); - + return function (node) { + var p = getPath(node, _path); + return typeof p === 'string' && selector.value.value.test(p); + }; case 'literal': - return "".concat(selector.value.value) === "".concat(p); - + { + var literal = "".concat(selector.value.value); + return function (node) { + return literal === "".concat(getPath(node, _path)); + }; + } case 'type': - return selector.value.value === _typeof(p); + return function (node) { + return selector.value.value === _typeof(getPath(node, _path)); + }; } - throw new Error("Unknown selector value type: ".concat(selector.value.type)); - case '!=': switch (selector.value.type) { case 'regexp': - return !selector.value.value.test(p); - + return function (node) { + return !selector.value.value.test(getPath(node, _path)); + }; case 'literal': - return "".concat(selector.value.value) !== "".concat(p); - + { + var _literal = "".concat(selector.value.value); + return function (node) { + return _literal !== "".concat(getPath(node, _path)); + }; + } case 'type': - return selector.value.value !== _typeof(p); + return function (node) { + return selector.value.value !== _typeof(getPath(node, _path)); + }; } - throw new Error("Unknown selector value type: ".concat(selector.value.type)); - case '<=': - return p <= selector.value.value; - + return function (node) { + return getPath(node, _path) <= selector.value.value; + }; case '<': - return p < selector.value.value; - + return function (node) { + return getPath(node, _path) < selector.value.value; + }; case '>': - return p > selector.value.value; - + return function (node) { + return getPath(node, _path) > selector.value.value; + }; case '>=': - return p >= selector.value.value; + return function (node) { + return getPath(node, _path) >= selector.value.value; + }; } - throw new Error("Unknown operator: ".concat(selector.operator)); } - case 'sibling': - return matches(node, selector.right, ancestry, options) && sibling(node, selector.left, ancestry, LEFT_SIDE, options) || selector.left.subject && matches(node, selector.left, ancestry, options) && sibling(node, selector.right, ancestry, RIGHT_SIDE, options); - + { + var _left2 = getMatcher(selector.left); + var _right2 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right2(node, ancestry, options) && sibling(node, _left2, ancestry, LEFT_SIDE, options) || selector.left.subject && _left2(node, ancestry, options) && sibling(node, _right2, ancestry, RIGHT_SIDE, options); + }; + } case 'adjacent': - return matches(node, selector.right, ancestry, options) && adjacent(node, selector.left, ancestry, LEFT_SIDE, options) || selector.right.subject && matches(node, selector.left, ancestry, options) && adjacent(node, selector.right, ancestry, RIGHT_SIDE, options); - + { + var _left3 = getMatcher(selector.left); + var _right3 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right3(node, ancestry, options) && adjacent(node, _left3, ancestry, LEFT_SIDE, options) || selector.right.subject && _left3(node, ancestry, options) && adjacent(node, _right3, ancestry, RIGHT_SIDE, options); + }; + } case 'nth-child': - return matches(node, selector.right, ancestry, options) && nthChild(node, ancestry, function () { - return selector.index.value - 1; - }, options); - + { + var nth = selector.index.value; + var _right4 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right4(node, ancestry, options) && nthChild(node, ancestry, nth, options); + }; + } case 'nth-last-child': - return matches(node, selector.right, ancestry, options) && nthChild(node, ancestry, function (length) { - return length - selector.index.value; - }, options); - + { + var _nth = -selector.index.value; + var _right5 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right5(node, ancestry, options) && nthChild(node, ancestry, _nth, options); + }; + } case 'class': - switch (selector.name.toLowerCase()) { - case 'statement': - if (node.type.slice(-9) === 'Statement') return true; - // fallthrough: interface Declaration <: Statement { } - - case 'declaration': - return node.type.slice(-11) === 'Declaration'; + { + return function (node, ancestry, options) { + if (options && options.matchClass) { + return options.matchClass(selector.name, node, ancestry); + } + if (options && options.nodeTypeKey) return false; + var name = selector.name.toLowerCase(); + switch (name) { + case 'statement': + if (node.type.slice(-9) === 'Statement') return true; + // fallthrough: interface Declaration <: Statement { } + case 'declaration': + return node.type.slice(-11) === 'Declaration'; + case 'pattern': + if (node.type.slice(-7) === 'Pattern') return true; + // fallthrough: interface Expression <: Node, Pattern { } + case 'expression': + return node.type.slice(-10) === 'Expression' || node.type.slice(-7) === 'Literal' || node.type === 'Identifier' && (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty') || node.type === 'MetaProperty'; + case 'function': + return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; + } + throw new Error("Unknown class name: ".concat(selector.name)); + }; + } + } + throw new Error("Unknown selector type: ".concat(selector.type)); + } - case 'pattern': - if (node.type.slice(-7) === 'Pattern') return true; - // fallthrough: interface Expression <: Node, Pattern { } + /** + * @callback TraverseOptionFallback + * @param {external:AST} node The given node. + * @returns {string[]} An array of visitor keys for the given node. + */ - case 'expression': - return node.type.slice(-10) === 'Expression' || node.type.slice(-7) === 'Literal' || node.type === 'Identifier' && (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty') || node.type === 'MetaProperty'; + /** + * @callback ClassMatcher + * @param {string} className The name of the class to match. + * @param {external:AST} node The node to match against. + * @param {Array} ancestry The ancestry of the node. + * @returns {boolean} True if the node matches the class, false if not. + */ - case 'function': - return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; - } + /** + * @typedef {object} ESQueryOptions + * @property {string} [nodeTypeKey="type"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery. + * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node. + * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes. + * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes. + */ - throw new Error("Unknown class name: ".concat(selector.name)); + /** + * Given a `node` and its ancestors, determine if `node` is matched + * by `selector`. + * @param {?external:AST} node + * @param {?SelectorAST} selector + * @param {external:AST[]} [ancestry=[]] + * @param {ESQueryOptions} [options] + * @throws {Error} Unknowns (operator, class name, selector type, or + * selector value type) + * @returns {boolean} + */ + function matches(node, selector, ancestry, options) { + if (!selector) { + return true; } - - throw new Error("Unknown selector type: ".concat(selector.type)); + if (!node) { + return false; + } + if (!ancestry) { + ancestry = []; + } + return getMatcher(selector)(node, ancestry, options); } + /** * Get visitor keys of a given node. * @param {external:AST} node The AST node to get keys. * @param {ESQueryOptions|undefined} options * @returns {string[]} Visitor keys of the node. */ - - function getVisitorKeys(node, options) { - var nodeType = node.type; - + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + var nodeType = node[nodeTypeKey]; if (options && options.visitorKeys && options.visitorKeys[nodeType]) { return options.visitorKeys[nodeType]; } - if (estraverse.VisitorKeys[nodeType]) { return estraverse.VisitorKeys[nodeType]; } - if (options && typeof options.fallback === 'function') { return options.fallback(node); - } // 'iteration' fallback - - + } + // 'iteration' fallback return Object.keys(node).filter(function (key) { - return key !== 'type'; + return key !== nodeTypeKey; }); } + /** * Check whether the given value is an ASTNode or not. * @param {any} node The value to check. + * @param {ESQueryOptions|undefined} options The options to use. * @returns {boolean} `true` if the value is an ASTNode. */ - - - function isNode(node) { - return node !== null && _typeof(node) === 'object' && typeof node.type === 'string'; + function isNode(node, options) { + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + return node !== null && _typeof(node) === 'object' && typeof node[nodeTypeKey] === 'string'; } + /** * Determines if the given node has a sibling that matches the - * given selector. + * given selector matcher. * @param {external:AST} node - * @param {SelectorSequenceAST} selector + * @param {SelectorMatcher} matcher * @param {external:AST[]} ancestry * @param {Side} side * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - - function sibling(node, selector, ancestry, side, options) { + function sibling(node, matcher, ancestry, side, options) { var _ancestry = _slicedToArray(ancestry, 1), - parent = _ancestry[0]; - + parent = _ancestry[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator7 = _createForOfIteratorHelper(keys), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var key = _step7.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var startIndex = listProp.indexOf(node); - - if (startIndex < 0) { - continue; - } - - var lowerBound = void 0, - upperBound = void 0; - - if (side === LEFT_SIDE) { - lowerBound = 0; - upperBound = startIndex; - } else { - lowerBound = startIndex + 1; - upperBound = listProp.length; - } - - for (var k = lowerBound; k < upperBound; ++k) { - if (isNode(listProp[k]) && matches(listProp[k], selector, ancestry, options)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var startIndex = listProp.indexOf(node); + if (startIndex < 0) { + continue; + } + var lowerBound = void 0, + upperBound = void 0; + if (side === LEFT_SIDE) { + lowerBound = 0; + upperBound = startIndex; + } else { + lowerBound = startIndex + 1; + upperBound = listProp.length; + } + for (var k = lowerBound; k < upperBound; ++k) { + if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) { + return true; } } } - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); } - return false; } + /** * Determines if the given node has an adjacent sibling that matches - * the given selector. + * the given selector matcher. * @param {external:AST} node - * @param {SelectorSequenceAST} selector + * @param {SelectorMatcher} matcher * @param {external:AST[]} ancestry * @param {Side} side * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - - function adjacent(node, selector, ancestry, side, options) { + function adjacent(node, matcher, ancestry, side, options) { var _ancestry2 = _slicedToArray(ancestry, 1), - parent = _ancestry2[0]; - + parent = _ancestry2[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator8 = _createForOfIteratorHelper(keys), - _step8; - - try { - for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { - var key = _step8.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var idx = listProp.indexOf(node); - - if (idx < 0) { - continue; - } - - if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1]) && matches(listProp[idx - 1], selector, ancestry, options)) { - return true; - } - - if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1]) && matches(listProp[idx + 1], selector, ancestry, options)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var idx = listProp.indexOf(node); + if (idx < 0) { + continue; + } + if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) { + return true; + } + if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) { + return true; } } - } catch (err) { - _iterator8.e(err); - } finally { - _iterator8.f(); } - return false; } - /** - * @callback IndexFunction - * @param {Integer} len Containing list's length - * @returns {Integer} - */ /** - * Determines if the given node is the nth child, determined by - * `idxFn`, which is given the containing list's length. + * Determines if the given node is the `nth` child. + * If `nth` is negative then the position is counted + * from the end of the list of children. * @param {external:AST} node * @param {external:AST[]} ancestry - * @param {IndexFunction} idxFn + * @param {Integer} nth * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - - function nthChild(node, ancestry, idxFn, options) { + function nthChild(node, ancestry, nth, options) { + if (nth === 0) { + return false; + } var _ancestry3 = _slicedToArray(ancestry, 1), - parent = _ancestry3[0]; - + parent = _ancestry3[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator9 = _createForOfIteratorHelper(keys), - _step9; - - try { - for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { - var key = _step9.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var idx = listProp.indexOf(node); - - if (idx >= 0 && idx === idxFn(listProp.length)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var idx = nth < 0 ? listProp.length + nth : nth - 1; + if (idx >= 0 && idx < listProp.length && listProp[idx] === node) { + return true; } } - } catch (err) { - _iterator9.e(err); - } finally { - _iterator9.f(); } - return false; } + /** * For each selector node marked as a subject, find the portion of the * selector that the subject must match. @@ -4669,29 +3911,23 @@ * @param {SelectorAST} [ancestor] Defaults to `selector` * @returns {SelectorAST[]} */ - - function subjects(selector, ancestor) { if (selector == null || _typeof(selector) != 'object') { return []; } - if (ancestor == null) { ancestor = selector; } - var results = selector.subject ? [ancestor] : []; - - for (var _i = 0, _Object$entries = _objectEntries(selector); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - p = _Object$entries$_i[0], - sel = _Object$entries$_i[1]; - + var keys = Object.keys(selector); + for (var i = 0; i < keys.length; ++i) { + var p = keys[i]; + var sel = selector[p]; results.push.apply(results, _toConsumableArray(subjects(sel, p === 'left' ? sel : ancestor))); } - return results; } + /** * @callback TraverseVisitor * @param {?external:AST} node @@ -4708,32 +3944,27 @@ * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function traverse(ast, selector, visitor, options) { if (!selector) { return; } - var ancestry = []; - var altSubjects = subjects(selector); + var matcher = getMatcher(selector); + var altSubjects = subjects(selector).map(getMatcher); estraverse.traverse(ast, { enter: function enter(node, parent) { if (parent != null) { ancestry.unshift(parent); } - - if (matches(node, selector, ancestry, options)) { + if (matcher(node, ancestry, options)) { if (altSubjects.length) { for (var i = 0, l = altSubjects.length; i < l; ++i) { - if (matches(node, altSubjects[i], ancestry, options)) { + if (altSubjects[i](node, ancestry, options)) { visitor(node, parent, ancestry); } - for (var k = 0, m = ancestry.length; k < m; ++k) { var succeedingAncestry = ancestry.slice(k + 1); - - if (matches(ancestry[k], altSubjects[i], succeedingAncestry, options)) { + if (altSubjects[i](ancestry[k], succeedingAncestry, options)) { visitor(ancestry[k], parent, succeedingAncestry); } } @@ -4750,6 +3981,7 @@ fallback: options && options.fallback || 'iteration' }); } + /** * From a JS AST and a selector AST, collect all JS AST nodes that * match the selector. @@ -4758,8 +3990,6 @@ * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function match(ast, selector, options) { var results = []; traverse(ast, selector, function (node) { @@ -4767,16 +3997,16 @@ }, options); return results; } + /** * Parse a selector string and return its AST. * @param {string} selector * @returns {SelectorAST} */ - - function parse(selector) { return parser.parse(selector); } + /** * Query the code AST using the selector string. * @param {external:AST} ast @@ -4784,12 +4014,9 @@ * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function query(ast, selector, options) { return match(ast, parse(selector), options); } - query.parse = parse; query.match = match; query.traverse = traverse; diff --git a/node_modules/esquery/dist/esquery.lite.js b/node_modules/esquery/dist/esquery.lite.js index 8a181abec..f5cc508e2 100644 --- a/node_modules/esquery/dist/esquery.lite.js +++ b/node_modules/esquery/dist/esquery.lite.js @@ -6,69 +6,57 @@ estraverse = estraverse && Object.prototype.hasOwnProperty.call(estraverse, 'default') ? estraverse['default'] : estraverse; + function _iterableToArrayLimit(arr, i) { + var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; + if (null != _i) { + var _s, + _e, + _x, + _r, + _arr = [], + _n = !0, + _d = !1; + try { + if (_x = (_i = _i.call(arr)).next, 0 === i) { + if (Object(_i) !== _i) return; + _n = !1; + } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); + } catch (err) { + _d = !0, _e = err; + } finally { + try { + if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + } finally { + if (_d) throw _e; + } + } + return _arr; + } + } function _typeof(obj) { "@babel/helpers - typeof"; - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); } - function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); - } - - function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); @@ -77,80 +65,18 @@ if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; } - function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { @@ -173,25 +99,20 @@ function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; child.prototype = new ctor(); } - function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; - if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } - peg$subclass(peg$SyntaxError, Error); - peg$SyntaxError.buildMessage = function (expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function literal(expectation) { @@ -199,12 +120,10 @@ }, "class": function _class(expectation) { var escapedParts = "", - i; - + i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } - return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function any(expectation) { @@ -217,11 +136,9 @@ return expectation.description; } }; - function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } - function literalEscape(s) { return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); @@ -229,7 +146,6 @@ return '\\x' + hex(ch); }); } - function classEscape(s) { return s.replace(/\\/g, '\\\\').replace(/\]/g, '\\]').replace(/\^/g, '\\^').replace(/-/g, '\\-').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { return '\\x0' + hex(ch); @@ -237,22 +153,17 @@ return '\\x' + hex(ch); }); } - function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } - function describeExpected(expected) { var descriptions = new Array(expected.length), - i, - j; - + i, + j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } - descriptions.sort(); - if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { @@ -260,296 +171,275 @@ j++; } } - descriptions.length = j; } - switch (descriptions.length) { case 1: return descriptions[0]; - case 2: return descriptions[0] + " or " + descriptions[1]; - default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } - function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; - function peg$parse(input, options) { options = options !== void 0 ? options : {}; - var peg$FAILED = {}, - peg$startRuleFunctions = { - start: peg$parsestart - }, - peg$startRuleFunction = peg$parsestart, - peg$c0 = function peg$c0(ss) { - return ss.length === 1 ? ss[0] : { - type: 'matches', - selectors: ss - }; - }, - peg$c1 = function peg$c1() { - return void 0; - }, - peg$c2 = " ", - peg$c3 = peg$literalExpectation(" ", false), - peg$c4 = /^[^ [\],():#!=><~+.]/, - peg$c5 = peg$classExpectation([" ", "[", "]", ",", "(", ")", ":", "#", "!", "=", ">", "<", "~", "+", "."], true, false), - peg$c6 = function peg$c6(i) { - return i.join(''); - }, - peg$c7 = ">", - peg$c8 = peg$literalExpectation(">", false), - peg$c9 = function peg$c9() { - return 'child'; - }, - peg$c10 = "~", - peg$c11 = peg$literalExpectation("~", false), - peg$c12 = function peg$c12() { - return 'sibling'; - }, - peg$c13 = "+", - peg$c14 = peg$literalExpectation("+", false), - peg$c15 = function peg$c15() { - return 'adjacent'; - }, - peg$c16 = function peg$c16() { - return 'descendant'; - }, - peg$c17 = ",", - peg$c18 = peg$literalExpectation(",", false), - peg$c19 = function peg$c19(s, ss) { - return [s].concat(ss.map(function (s) { - return s[3]; - })); - }, - peg$c20 = function peg$c20(a, ops) { - return ops.reduce(function (memo, rhs) { + peg$startRuleFunctions = { + start: peg$parsestart + }, + peg$startRuleFunction = peg$parsestart, + peg$c0 = function peg$c0(ss) { + return ss.length === 1 ? ss[0] : { + type: 'matches', + selectors: ss + }; + }, + peg$c1 = function peg$c1() { + return void 0; + }, + peg$c2 = " ", + peg$c3 = peg$literalExpectation(" ", false), + peg$c4 = /^[^ [\],():#!=><~+.]/, + peg$c5 = peg$classExpectation([" ", "[", "]", ",", "(", ")", ":", "#", "!", "=", ">", "<", "~", "+", "."], true, false), + peg$c6 = function peg$c6(i) { + return i.join(''); + }, + peg$c7 = ">", + peg$c8 = peg$literalExpectation(">", false), + peg$c9 = function peg$c9() { + return 'child'; + }, + peg$c10 = "~", + peg$c11 = peg$literalExpectation("~", false), + peg$c12 = function peg$c12() { + return 'sibling'; + }, + peg$c13 = "+", + peg$c14 = peg$literalExpectation("+", false), + peg$c15 = function peg$c15() { + return 'adjacent'; + }, + peg$c16 = function peg$c16() { + return 'descendant'; + }, + peg$c17 = ",", + peg$c18 = peg$literalExpectation(",", false), + peg$c19 = function peg$c19(s, ss) { + return [s].concat(ss.map(function (s) { + return s[3]; + })); + }, + peg$c20 = function peg$c20(a, ops) { + return ops.reduce(function (memo, rhs) { + return { + type: rhs[0], + left: memo, + right: rhs[1] + }; + }, a); + }, + peg$c21 = "!", + peg$c22 = peg$literalExpectation("!", false), + peg$c23 = function peg$c23(subject, as) { + var b = as.length === 1 ? as[0] : { + type: 'compound', + selectors: as + }; + if (subject) b.subject = true; + return b; + }, + peg$c24 = "*", + peg$c25 = peg$literalExpectation("*", false), + peg$c26 = function peg$c26(a) { return { - type: rhs[0], - left: memo, - right: rhs[1] + type: 'wildcard', + value: a }; - }, a); - }, - peg$c21 = "!", - peg$c22 = peg$literalExpectation("!", false), - peg$c23 = function peg$c23(subject, as) { - var b = as.length === 1 ? as[0] : { - type: 'compound', - selectors: as - }; - if (subject) b.subject = true; - return b; - }, - peg$c24 = "*", - peg$c25 = peg$literalExpectation("*", false), - peg$c26 = function peg$c26(a) { - return { - type: 'wildcard', - value: a - }; - }, - peg$c27 = "#", - peg$c28 = peg$literalExpectation("#", false), - peg$c29 = function peg$c29(i) { - return { - type: 'identifier', - value: i - }; - }, - peg$c30 = "[", - peg$c31 = peg$literalExpectation("[", false), - peg$c32 = "]", - peg$c33 = peg$literalExpectation("]", false), - peg$c34 = function peg$c34(v) { - return v; - }, - peg$c35 = /^[>", "<", "!"], false, false), - peg$c37 = "=", - peg$c38 = peg$literalExpectation("=", false), - peg$c39 = function peg$c39(a) { - return (a || '') + '='; - }, - peg$c40 = /^[><]/, - peg$c41 = peg$classExpectation([">", "<"], false, false), - peg$c42 = ".", - peg$c43 = peg$literalExpectation(".", false), - peg$c44 = function peg$c44(a, as) { - return [].concat.apply([a], as).join(''); - }, - peg$c45 = function peg$c45(name, op, value) { - return { - type: 'attribute', - name: name, - operator: op, - value: value - }; - }, - peg$c46 = function peg$c46(name) { - return { - type: 'attribute', - name: name - }; - }, - peg$c47 = "\"", - peg$c48 = peg$literalExpectation("\"", false), - peg$c49 = /^[^\\"]/, - peg$c50 = peg$classExpectation(["\\", "\""], true, false), - peg$c51 = "\\", - peg$c52 = peg$literalExpectation("\\", false), - peg$c53 = peg$anyExpectation(), - peg$c54 = function peg$c54(a, b) { - return a + b; - }, - peg$c55 = function peg$c55(d) { - return { - type: 'literal', - value: strUnescape(d.join('')) - }; - }, - peg$c56 = "'", - peg$c57 = peg$literalExpectation("'", false), - peg$c58 = /^[^\\']/, - peg$c59 = peg$classExpectation(["\\", "'"], true, false), - peg$c60 = /^[0-9]/, - peg$c61 = peg$classExpectation([["0", "9"]], false, false), - peg$c62 = function peg$c62(a, b) { - // Can use `a.flat().join('')` once supported - var leadingDecimals = a ? [].concat.apply([], a).join('') : ''; - return { - type: 'literal', - value: parseFloat(leadingDecimals + b.join('')) - }; - }, - peg$c63 = function peg$c63(i) { - return { - type: 'literal', - value: i - }; - }, - peg$c64 = "type(", - peg$c65 = peg$literalExpectation("type(", false), - peg$c66 = /^[^ )]/, - peg$c67 = peg$classExpectation([" ", ")"], true, false), - peg$c68 = ")", - peg$c69 = peg$literalExpectation(")", false), - peg$c70 = function peg$c70(t) { - return { - type: 'type', - value: t.join('') - }; - }, - peg$c71 = /^[imsu]/, - peg$c72 = peg$classExpectation(["i", "m", "s", "u"], false, false), - peg$c73 = "/", - peg$c74 = peg$literalExpectation("/", false), - peg$c75 = /^[^\/]/, - peg$c76 = peg$classExpectation(["/"], true, false), - peg$c77 = function peg$c77(d, flgs) { - return { - type: 'regexp', - value: new RegExp(d.join(''), flgs ? flgs.join('') : '') - }; - }, - peg$c78 = function peg$c78(i, is) { - return { - type: 'field', - name: is.reduce(function (memo, p) { - return memo + p[0] + p[1]; - }, i) - }; - }, - peg$c79 = ":not(", - peg$c80 = peg$literalExpectation(":not(", false), - peg$c81 = function peg$c81(ss) { - return { - type: 'not', - selectors: ss - }; - }, - peg$c82 = ":matches(", - peg$c83 = peg$literalExpectation(":matches(", false), - peg$c84 = function peg$c84(ss) { - return { - type: 'matches', - selectors: ss - }; - }, - peg$c85 = ":has(", - peg$c86 = peg$literalExpectation(":has(", false), - peg$c87 = function peg$c87(ss) { - return { - type: 'has', - selectors: ss - }; - }, - peg$c88 = ":first-child", - peg$c89 = peg$literalExpectation(":first-child", false), - peg$c90 = function peg$c90() { - return nth(1); - }, - peg$c91 = ":last-child", - peg$c92 = peg$literalExpectation(":last-child", false), - peg$c93 = function peg$c93() { - return nthLast(1); - }, - peg$c94 = ":nth-child(", - peg$c95 = peg$literalExpectation(":nth-child(", false), - peg$c96 = function peg$c96(n) { - return nth(parseInt(n.join(''), 10)); - }, - peg$c97 = ":nth-last-child(", - peg$c98 = peg$literalExpectation(":nth-last-child(", false), - peg$c99 = function peg$c99(n) { - return nthLast(parseInt(n.join(''), 10)); - }, - peg$c100 = ":", - peg$c101 = peg$literalExpectation(":", false), - peg$c102 = "statement", - peg$c103 = peg$literalExpectation("statement", true), - peg$c104 = "expression", - peg$c105 = peg$literalExpectation("expression", true), - peg$c106 = "declaration", - peg$c107 = peg$literalExpectation("declaration", true), - peg$c108 = "function", - peg$c109 = peg$literalExpectation("function", true), - peg$c110 = "pattern", - peg$c111 = peg$literalExpectation("pattern", true), - peg$c112 = function peg$c112(c) { - return { - type: 'class', - name: c - }; - }, - peg$currPos = 0, - peg$posDetailsCache = [{ - line: 1, - column: 1 - }], - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$resultsCache = {}, - peg$result; - + }, + peg$c27 = "#", + peg$c28 = peg$literalExpectation("#", false), + peg$c29 = function peg$c29(i) { + return { + type: 'identifier', + value: i + }; + }, + peg$c30 = "[", + peg$c31 = peg$literalExpectation("[", false), + peg$c32 = "]", + peg$c33 = peg$literalExpectation("]", false), + peg$c34 = function peg$c34(v) { + return v; + }, + peg$c35 = /^[>", "<", "!"], false, false), + peg$c37 = "=", + peg$c38 = peg$literalExpectation("=", false), + peg$c39 = function peg$c39(a) { + return (a || '') + '='; + }, + peg$c40 = /^[><]/, + peg$c41 = peg$classExpectation([">", "<"], false, false), + peg$c42 = ".", + peg$c43 = peg$literalExpectation(".", false), + peg$c44 = function peg$c44(a, as) { + return [].concat.apply([a], as).join(''); + }, + peg$c45 = function peg$c45(name, op, value) { + return { + type: 'attribute', + name: name, + operator: op, + value: value + }; + }, + peg$c46 = function peg$c46(name) { + return { + type: 'attribute', + name: name + }; + }, + peg$c47 = "\"", + peg$c48 = peg$literalExpectation("\"", false), + peg$c49 = /^[^\\"]/, + peg$c50 = peg$classExpectation(["\\", "\""], true, false), + peg$c51 = "\\", + peg$c52 = peg$literalExpectation("\\", false), + peg$c53 = peg$anyExpectation(), + peg$c54 = function peg$c54(a, b) { + return a + b; + }, + peg$c55 = function peg$c55(d) { + return { + type: 'literal', + value: strUnescape(d.join('')) + }; + }, + peg$c56 = "'", + peg$c57 = peg$literalExpectation("'", false), + peg$c58 = /^[^\\']/, + peg$c59 = peg$classExpectation(["\\", "'"], true, false), + peg$c60 = /^[0-9]/, + peg$c61 = peg$classExpectation([["0", "9"]], false, false), + peg$c62 = function peg$c62(a, b) { + // Can use `a.flat().join('')` once supported + var leadingDecimals = a ? [].concat.apply([], a).join('') : ''; + return { + type: 'literal', + value: parseFloat(leadingDecimals + b.join('')) + }; + }, + peg$c63 = function peg$c63(i) { + return { + type: 'literal', + value: i + }; + }, + peg$c64 = "type(", + peg$c65 = peg$literalExpectation("type(", false), + peg$c66 = /^[^ )]/, + peg$c67 = peg$classExpectation([" ", ")"], true, false), + peg$c68 = ")", + peg$c69 = peg$literalExpectation(")", false), + peg$c70 = function peg$c70(t) { + return { + type: 'type', + value: t.join('') + }; + }, + peg$c71 = /^[imsu]/, + peg$c72 = peg$classExpectation(["i", "m", "s", "u"], false, false), + peg$c73 = "/", + peg$c74 = peg$literalExpectation("/", false), + peg$c75 = /^[^\/]/, + peg$c76 = peg$classExpectation(["/"], true, false), + peg$c77 = function peg$c77(d, flgs) { + return { + type: 'regexp', + value: new RegExp(d.join(''), flgs ? flgs.join('') : '') + }; + }, + peg$c78 = function peg$c78(i, is) { + return { + type: 'field', + name: is.reduce(function (memo, p) { + return memo + p[0] + p[1]; + }, i) + }; + }, + peg$c79 = ":not(", + peg$c80 = peg$literalExpectation(":not(", false), + peg$c81 = function peg$c81(ss) { + return { + type: 'not', + selectors: ss + }; + }, + peg$c82 = ":matches(", + peg$c83 = peg$literalExpectation(":matches(", false), + peg$c84 = function peg$c84(ss) { + return { + type: 'matches', + selectors: ss + }; + }, + peg$c85 = ":has(", + peg$c86 = peg$literalExpectation(":has(", false), + peg$c87 = function peg$c87(ss) { + return { + type: 'has', + selectors: ss + }; + }, + peg$c88 = ":first-child", + peg$c89 = peg$literalExpectation(":first-child", false), + peg$c90 = function peg$c90() { + return nth(1); + }, + peg$c91 = ":last-child", + peg$c92 = peg$literalExpectation(":last-child", false), + peg$c93 = function peg$c93() { + return nthLast(1); + }, + peg$c94 = ":nth-child(", + peg$c95 = peg$literalExpectation(":nth-child(", false), + peg$c96 = function peg$c96(n) { + return nth(parseInt(n.join(''), 10)); + }, + peg$c97 = ":nth-last-child(", + peg$c98 = peg$literalExpectation(":nth-last-child(", false), + peg$c99 = function peg$c99(n) { + return nthLast(parseInt(n.join(''), 10)); + }, + peg$c100 = ":", + peg$c101 = peg$literalExpectation(":", false), + peg$c102 = function peg$c102(c) { + return { + type: 'class', + name: c + }; + }, + peg$currPos = 0, + peg$posDetailsCache = [{ + line: 1, + column: 1 + }], + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$resultsCache = {}, + peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } - function peg$literalExpectation(text, ignoreCase) { return { type: "literal", @@ -557,7 +447,6 @@ ignoreCase: ignoreCase }; } - function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", @@ -566,38 +455,31 @@ ignoreCase: ignoreCase }; } - function peg$anyExpectation() { return { type: "any" }; } - function peg$endExpectation() { return { type: "end" }; } - function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], - p; - + p; if (details) { return details; } else { p = pos - 1; - while (!peg$posDetailsCache[p]) { p--; } - details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; - while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; @@ -605,18 +487,15 @@ } else { details.column++; } - p++; } - peg$posDetailsCache[pos] = details; return details; } } - function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), - endPosDetails = peg$computePosDetails(endPos); + endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, @@ -630,43 +509,33 @@ } }; } - function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } - if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } - peg$maxFailExpected.push(expected); } - function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); } - function peg$parsestart() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 0, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { s2 = peg$parseselectors(); - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c0(s2); s0 = s1; @@ -682,104 +551,83 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { s1 = peg$c1(); } - s0 = s1; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parse_() { var s0, s1; var key = peg$currPos * 30 + 1, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = []; - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } - while (s1 !== peg$FAILED) { s0.push(s1); - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseidentifierName() { var s0, s1, s2; var key = peg$currPos * 30 + 2, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = []; - if (peg$c4.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c5); } } - if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); - if (peg$c4.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c5); } @@ -788,11 +636,9 @@ } else { s1 = peg$FAILED; } - if (s1 !== peg$FAILED) { s1 = peg$c6(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -800,35 +646,28 @@ }; return s0; } - function peg$parsebinaryOp() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 3, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 62) { s2 = peg$c7; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c8); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c9(); s0 = s1; @@ -844,26 +683,21 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 126) { s2 = peg$c10; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c11); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c12(); s0 = s1; @@ -879,26 +713,21 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parse_(); - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { s2 = peg$c13; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c14); } } - if (s2 !== peg$FAILED) { s3 = peg$parse_(); - if (s3 !== peg$FAILED) { s1 = peg$c15(); s0 = s1; @@ -914,24 +743,19 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 32) { s1 = peg$c2; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c3); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s1 = peg$c16(); s0 = s1; @@ -946,50 +770,40 @@ } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; var key = peg$currPos * 30 + 4, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseselector(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s5 = peg$c17; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c18); } } - if (s5 !== peg$FAILED) { s6 = peg$parse_(); - if (s6 !== peg$FAILED) { s7 = peg$parseselector(); - if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -1009,30 +823,24 @@ peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s5 = peg$c17; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c18); } } - if (s5 !== peg$FAILED) { s6 = peg$parse_(); - if (s6 !== peg$FAILED) { s7 = peg$parseselector(); - if (s7 !== peg$FAILED) { s4 = [s4, s5, s6, s7]; s3 = s4; @@ -1053,7 +861,6 @@ s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c19(s1, s2); s0 = s1; @@ -1065,35 +872,28 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseselector() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 5, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parsesequence(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parsebinaryOp(); - if (s4 !== peg$FAILED) { s5 = peg$parsesequence(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1105,15 +905,12 @@ peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parsebinaryOp(); - if (s4 !== peg$FAILED) { s5 = peg$parsesequence(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1126,7 +923,6 @@ s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c20(s1, s2); s0 = s1; @@ -1138,45 +934,36 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsesequence() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 6, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 33) { s1 = peg$c21; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c22); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseatom(); - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); @@ -1185,7 +972,6 @@ } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { s1 = peg$c23(s1, s2); s0 = s1; @@ -1197,56 +983,41 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseatom() { var s0; var key = peg$currPos * 30 + 7, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$parsewildcard(); - if (s0 === peg$FAILED) { s0 = peg$parseidentifier(); - if (s0 === peg$FAILED) { s0 = peg$parseattr(); - if (s0 === peg$FAILED) { s0 = peg$parsefield(); - if (s0 === peg$FAILED) { s0 = peg$parsenegation(); - if (s0 === peg$FAILED) { s0 = peg$parsematches(); - if (s0 === peg$FAILED) { s0 = peg$parsehas(); - if (s0 === peg$FAILED) { s0 = peg$parsefirstChild(); - if (s0 === peg$FAILED) { s0 = peg$parselastChild(); - if (s0 === peg$FAILED) { s0 = peg$parsenthChild(); - if (s0 === peg$FAILED) { s0 = peg$parsenthLastChild(); - if (s0 === peg$FAILED) { s0 = peg$parseclass(); } @@ -1260,41 +1031,33 @@ } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsewildcard() { var s0, s1; var key = peg$currPos * 30 + 8, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { s1 = peg$c24; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c25); } } - if (s1 !== peg$FAILED) { s1 = peg$c26(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -1302,37 +1065,29 @@ }; return s0; } - function peg$parseidentifier() { var s0, s1, s2; var key = peg$currPos * 30 + 9, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 35) { s1 = peg$c27; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c28); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); - if (s2 !== peg$FAILED) { s1 = peg$c29(s2); s0 = s1; @@ -1344,58 +1099,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattr() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 10, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { s1 = peg$c30; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c31); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrValue(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 93) { s5 = peg$c32; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c33); } } - if (s5 !== peg$FAILED) { s1 = peg$c34(s3); s0 = s1; @@ -1419,53 +1162,43 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrOps() { var s0, s1, s2; var key = peg$currPos * 30 + 11, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (peg$c35.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c36); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c37; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c38); } } - if (s2 !== peg$FAILED) { s1 = peg$c39(s1); s0 = s1; @@ -1477,66 +1210,54 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { if (peg$c40.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; - { peg$fail(peg$c41); } } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrEqOps() { var s0, s1, s2; var key = peg$currPos * 30 + 12, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 33) { s1 = peg$c21; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c22); } } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c37; peg$currPos++; } else { s2 = peg$FAILED; - { peg$fail(peg$c38); } } - if (s2 !== peg$FAILED) { s1 = peg$c39(s1); s0 = s1; @@ -1548,45 +1269,36 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 13, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseidentifierName(); - if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s4 = peg$c42; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s4 !== peg$FAILED) { s5 = peg$parseidentifierName(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1598,25 +1310,20 @@ peg$currPos = s3; s3 = peg$FAILED; } - while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s4 = peg$c42; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s4 !== peg$FAILED) { s5 = peg$parseidentifierName(); - if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; @@ -1629,7 +1336,6 @@ s3 = peg$FAILED; } } - if (s2 !== peg$FAILED) { s1 = peg$c44(s1, s2); s0 = s1; @@ -1641,43 +1347,33 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 14, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrEqOps(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { s5 = peg$parsetype(); - if (s5 === peg$FAILED) { s5 = peg$parseregex(); } - if (s5 !== peg$FAILED) { s1 = peg$c45(s1, s3, s5); s0 = s1; @@ -1701,31 +1397,23 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseattrOps(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { s5 = peg$parsestring(); - if (s5 === peg$FAILED) { s5 = peg$parsenumber(); - if (s5 === peg$FAILED) { s5 = peg$parsepath(); } } - if (s5 !== peg$FAILED) { s1 = peg$c45(s1, s3, s5); s0 = s1; @@ -1749,89 +1437,71 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseattrName(); - if (s1 !== peg$FAILED) { s1 = peg$c46(s1); } - s0 = s1; } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsestring() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 15, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c47; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c48); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c49.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c50); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -1844,47 +1514,38 @@ s3 = peg$FAILED; } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c49.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c50); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -1898,19 +1559,16 @@ } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { s3 = peg$c47; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c48); } } - if (s3 !== peg$FAILED) { s1 = peg$c55(s2); s0 = s1; @@ -1926,61 +1584,49 @@ peg$currPos = s0; s0 = peg$FAILED; } - if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 39) { s1 = peg$c56; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c57); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c58.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c59); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -1993,47 +1639,38 @@ s3 = peg$FAILED; } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c58.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c59); } } - if (s3 === peg$FAILED) { s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { s4 = peg$c51; peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c52); } } - if (s4 !== peg$FAILED) { if (input.length > peg$currPos) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c53); } } - if (s5 !== peg$FAILED) { s4 = peg$c54(s4, s5); s3 = s4; @@ -2047,19 +1684,16 @@ } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { s3 = peg$c56; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c57); } } - if (s3 !== peg$FAILED) { s1 = peg$c55(s2); s0 = s1; @@ -2076,66 +1710,54 @@ s0 = peg$FAILED; } } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenumber() { var s0, s1, s2, s3; var key = peg$currPos * 30 + 16, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$currPos; s2 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } - while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { s3 = peg$c42; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s3 !== peg$FAILED) { s2 = [s2, s3]; s1 = s2; @@ -2147,35 +1769,28 @@ peg$currPos = s1; s1 = peg$FAILED; } - if (s1 === peg$FAILED) { s1 = null; } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c60.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c61); } @@ -2184,7 +1799,6 @@ } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { s1 = peg$c62(s1, s2); s0 = s1; @@ -2196,31 +1810,25 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsepath() { var s0, s1; var key = peg$currPos * 30 + 17, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; s1 = peg$parseidentifierName(); - if (s1 !== peg$FAILED) { s1 = peg$c63(s1); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -2228,57 +1836,45 @@ }; return s0; } - function peg$parsetype() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 18, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c64) { s1 = peg$c64; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c65); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c66.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c67); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c66.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c67); } @@ -2287,22 +1883,18 @@ } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c70(s3); s0 = s1; @@ -2326,47 +1918,38 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseflags() { var s0, s1; var key = peg$currPos * 30 + 19, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c72); } } - if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); - if (peg$c71.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c72); } @@ -2375,61 +1958,49 @@ } else { s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseregex() { var s0, s1, s2, s3, s4; var key = peg$currPos * 30 + 20, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 47) { s1 = peg$c73; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c74); } } - if (s1 !== peg$FAILED) { s2 = []; - if (peg$c75.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c76); } } - if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c75.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c76); } @@ -2438,26 +2009,21 @@ } else { s2 = peg$FAILED; } - if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { s3 = peg$c73; peg$currPos++; } else { s3 = peg$FAILED; - { peg$fail(peg$c74); } } - if (s3 !== peg$FAILED) { s4 = peg$parseflags(); - if (s4 === peg$FAILED) { s4 = null; } - if (s4 !== peg$FAILED) { s1 = peg$c77(s2, s4); s0 = s1; @@ -2477,58 +2043,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; var key = peg$currPos * 30 + 21, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s1 = peg$c42; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); - if (s2 !== peg$FAILED) { s3 = []; s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s5 = peg$c42; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s5 !== peg$FAILED) { s6 = peg$parseidentifierName(); - if (s6 !== peg$FAILED) { s5 = [s5, s6]; s4 = s5; @@ -2540,25 +2094,20 @@ peg$currPos = s4; s4 = peg$FAILED; } - while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { s5 = peg$c42; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c43); } } - if (s5 !== peg$FAILED) { s6 = peg$parseidentifierName(); - if (s6 !== peg$FAILED) { s5 = [s5, s6]; s4 = s5; @@ -2571,7 +2120,6 @@ s4 = peg$FAILED; } } - if (s3 !== peg$FAILED) { s1 = peg$c78(s2, s3); s0 = s1; @@ -2587,58 +2135,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 22, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c79) { s1 = peg$c79; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c80); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c81(s3); s0 = s1; @@ -2662,58 +2198,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsematches() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 23, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c82) { s1 = peg$c82; peg$currPos += 9; } else { s1 = peg$FAILED; - { peg$fail(peg$c83); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c84(s3); s0 = s1; @@ -2737,58 +2261,46 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsehas() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 24, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c85) { s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; - { peg$fail(peg$c86); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = peg$parseselectors(); - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c87(s3); s0 = s1; @@ -2812,41 +2324,33 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsefirstChild() { var s0, s1; var key = peg$currPos * 30 + 25, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c88) { s1 = peg$c88; peg$currPos += 12; } else { s1 = peg$FAILED; - { peg$fail(peg$c89); } } - if (s1 !== peg$FAILED) { s1 = peg$c90(); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -2854,34 +2358,27 @@ }; return s0; } - function peg$parselastChild() { var s0, s1; var key = peg$currPos * 30 + 26, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c91) { s1 = peg$c91; peg$currPos += 11; } else { s1 = peg$FAILED; - { peg$fail(peg$c92); } } - if (s1 !== peg$FAILED) { s1 = peg$c93(); } - s0 = s1; peg$resultsCache[key] = { nextPos: peg$currPos, @@ -2889,57 +2386,45 @@ }; return s0; } - function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 27, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c94) { s1 = peg$c94; peg$currPos += 11; } else { s1 = peg$FAILED; - { peg$fail(peg$c95); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } @@ -2948,22 +2433,18 @@ } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c96(s3); s0 = s1; @@ -2987,64 +2468,51 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; var key = peg$currPos * 30 + 28, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c97) { s1 = peg$c97; peg$currPos += 16; } else { s1 = peg$FAILED; - { peg$fail(peg$c98); } } - if (s1 !== peg$FAILED) { s2 = peg$parse_(); - if (s2 !== peg$FAILED) { s3 = []; - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } } - if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); - if (peg$c60.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; - { peg$fail(peg$c61); } @@ -3053,22 +2521,18 @@ } else { s3 = peg$FAILED; } - if (s3 !== peg$FAILED) { s4 = peg$parse_(); - if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c68; peg$currPos++; } else { s5 = peg$FAILED; - { peg$fail(peg$c69); } } - if (s5 !== peg$FAILED) { s1 = peg$c99(s3); s0 = s1; @@ -3092,103 +2556,34 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function peg$parseclass() { var s0, s1, s2; var key = peg$currPos * 30 + 29, - cached = peg$resultsCache[key]; - + cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 58) { s1 = peg$c100; peg$currPos++; } else { s1 = peg$FAILED; - { peg$fail(peg$c101); } } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) { - s2 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c103); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) { - s2 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c105); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) { - s2 = input.substr(peg$currPos, 11); - peg$currPos += 11; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c107); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) { - s2 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c109); - } - } - - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) { - s2 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s2 = peg$FAILED; - - { - peg$fail(peg$c111); - } - } - } - } - } - } - + s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { - s1 = peg$c112(s2); + s1 = peg$c102(s2); s0 = s1; } else { peg$currPos = s0; @@ -3198,14 +2593,12 @@ peg$currPos = s0; s0 = peg$FAILED; } - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } - function nth(n) { return { type: 'nth-child', @@ -3215,7 +2608,6 @@ } }; } - function nthLast(n) { return { type: 'nth-last-child', @@ -3225,47 +2617,36 @@ } }; } - function strUnescape(s) { return s.replace(/\\(.)/g, function (match, ch) { switch (ch) { case 'b': return '\b'; - case 'f': return '\f'; - case 'n': return '\n'; - case 'r': return '\r'; - case 't': return '\t'; - case 'v': return '\v'; - default: return ch; } }); } - peg$result = peg$startRuleFunction(); - if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } - throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); } } - return { SyntaxError: peg$SyntaxError, parse: peg$parse @@ -3273,20 +2654,13 @@ }); }); - function _objectEntries(obj) { - var entries = []; - var keys = Object.keys(obj); - - for (var k = 0; k < keys.length; k++) entries.push([keys[k], obj[keys[k]]]); - - return entries; - } /** * @typedef {"LEFT_SIDE"|"RIGHT_SIDE"} Side */ var LEFT_SIDE = 'LEFT_SIDE'; var RIGHT_SIDE = 'RIGHT_SIDE'; + /** * @external AST * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html @@ -3307,555 +2681,519 @@ * Get the value of a property which may be multiple levels down * in the object. * @param {?PlainObject} obj - * @param {string} key + * @param {string[]} keys * @returns {undefined|boolean|string|number|external:AST} */ - - function getPath(obj, key) { - var keys = key.split('.'); - - var _iterator = _createForOfIteratorHelper(keys), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var _key = _step.value; - - if (obj == null) { - return obj; - } - - obj = obj[_key]; + function getPath(obj, keys) { + for (var i = 0; i < keys.length; ++i) { + if (obj == null) { + return obj; } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); + obj = obj[keys[i]]; } - return obj; } + /** * Determine whether `node` can be reached by following `path`, * starting at `ancestor`. * @param {?external:AST} node * @param {?external:AST} ancestor * @param {string[]} path + * @param {Integer} fromPathIndex * @returns {boolean} */ - - - function inPath(node, ancestor, path) { - if (path.length === 0) { - return node === ancestor; - } - - if (ancestor == null) { - return false; - } - - var field = ancestor[path[0]]; - var remainingPath = path.slice(1); - - if (Array.isArray(field)) { - var _iterator2 = _createForOfIteratorHelper(field), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var component = _step2.value; - - if (inPath(node, component, remainingPath)) { + function inPath(node, ancestor, path, fromPathIndex) { + var current = ancestor; + for (var i = fromPathIndex; i < path.length; ++i) { + if (current == null) { + return false; + } + var field = current[path[i]]; + if (Array.isArray(field)) { + for (var k = 0; k < field.length; ++k) { + if (inPath(node, field[k], path, i + 1)) { return true; } } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); + return false; } - - return false; - } else { - return inPath(node, field, remainingPath); + current = field; } + return node === current; } + /** - * @callback TraverseOptionFallback - * @param {external:AST} node The given node. - * @returns {string[]} An array of visitor keys for the given node. - */ + * A generated matcher function for a selector. + * @typedef {function} SelectorMatcher + */ /** - * @typedef {object} ESQueryOptions - * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node. - * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes. - */ + * A WeakMap for holding cached matcher functions for selectors. + * @type {WeakMap} + */ + var MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap() : null; /** - * Given a `node` and its ancestors, determine if `node` is matched - * by `selector`. - * @param {?external:AST} node + * Look up a matcher function for `selector` in the cache. + * If it does not exist, generate it with `generateMatcher` and add it to the cache. + * In engines without WeakMap, the caching is skipped and matchers are generated with every call. * @param {?SelectorAST} selector - * @param {external:AST[]} [ancestry=[]] - * @param {ESQueryOptions} [options] - * @throws {Error} Unknowns (operator, class name, selector type, or - * selector value type) - * @returns {boolean} + * @returns {SelectorMatcher} */ - - - function matches(node, selector, ancestry, options) { - if (!selector) { - return true; - } - - if (!node) { - return false; + function getMatcher(selector) { + if (selector == null) { + return function () { + return true; + }; } - - if (!ancestry) { - ancestry = []; + if (MATCHER_CACHE != null) { + var matcher = MATCHER_CACHE.get(selector); + if (matcher != null) { + return matcher; + } + matcher = generateMatcher(selector); + MATCHER_CACHE.set(selector, matcher); + return matcher; } + return generateMatcher(selector); + } + /** + * Create a matcher function for `selector`, + * @param {?SelectorAST} selector + * @returns {SelectorMatcher} + */ + function generateMatcher(selector) { switch (selector.type) { case 'wildcard': - return true; - + return function () { + return true; + }; case 'identifier': - return selector.value.toLowerCase() === node.type.toLowerCase(); - + { + var value = selector.value.toLowerCase(); + return function (node, ancestry, options) { + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + return value === node[nodeTypeKey].toLowerCase(); + }; + } case 'field': { var path = selector.name.split('.'); - var ancestor = ancestry[path.length - 1]; - return inPath(node, ancestor, path); + return function (node, ancestry) { + var ancestor = ancestry[path.length - 1]; + return inPath(node, ancestor, path, 0); + }; } - case 'matches': - var _iterator3 = _createForOfIteratorHelper(selector.selectors), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var sel = _step3.value; - - if (matches(node, sel, ancestry, options)) { - return true; + { + var matchers = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < matchers.length; ++i) { + if (matchers[i](node, ancestry, options)) { + return true; + } } - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); + return false; + }; } - - return false; - case 'compound': - var _iterator4 = _createForOfIteratorHelper(selector.selectors), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var _sel = _step4.value; - - if (!matches(node, _sel, ancestry, options)) { - return false; + { + var _matchers = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < _matchers.length; ++i) { + if (!_matchers[i](node, ancestry, options)) { + return false; + } } - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); + return true; + }; } - - return true; - case 'not': - var _iterator5 = _createForOfIteratorHelper(selector.selectors), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var _sel2 = _step5.value; - - if (matches(node, _sel2, ancestry, options)) { - return false; + { + var _matchers2 = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + for (var i = 0; i < _matchers2.length; ++i) { + if (_matchers2[i](node, ancestry, options)) { + return false; + } } - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); + return true; + }; } - - return true; - case 'has': { - var _ret = function () { - var collector = []; - - var _iterator6 = _createForOfIteratorHelper(selector.selectors), - _step6; - - try { - var _loop = function _loop() { - var sel = _step6.value; - var a = []; - estraverse.traverse(node, { - enter: function enter(node, parent) { - if (parent != null) { - a.unshift(parent); - } - - if (matches(node, sel, a, options)) { - collector.push(node); - } - }, - leave: function leave() { - a.shift(); - }, - keys: options && options.visitorKeys, - fallback: options && options.fallback || 'iteration' - }); - }; - - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - _loop(); - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - - return { - v: collector.length !== 0 - }; - }(); - - if (_typeof(_ret) === "object") return _ret.v; + var _matchers3 = selector.selectors.map(getMatcher); + return function (node, ancestry, options) { + var result = false; + var a = []; + estraverse.traverse(node, { + enter: function enter(node, parent) { + if (parent != null) { + a.unshift(parent); + } + for (var i = 0; i < _matchers3.length; ++i) { + if (_matchers3[i](node, a, options)) { + result = true; + this["break"](); + return; + } + } + }, + leave: function leave() { + a.shift(); + }, + keys: options && options.visitorKeys, + fallback: options && options.fallback || 'iteration' + }); + return result; + }; } - case 'child': - if (matches(node, selector.right, ancestry, options)) { - return matches(ancestry[0], selector.left, ancestry.slice(1), options); + { + var left = getMatcher(selector.left); + var right = getMatcher(selector.right); + return function (node, ancestry, options) { + if (ancestry.length > 0 && right(node, ancestry, options)) { + return left(ancestry[0], ancestry.slice(1), options); + } + return false; + }; } - - return false; - case 'descendant': - if (matches(node, selector.right, ancestry, options)) { - for (var i = 0, l = ancestry.length; i < l; ++i) { - if (matches(ancestry[i], selector.left, ancestry.slice(i + 1), options)) { - return true; + { + var _left = getMatcher(selector.left); + var _right = getMatcher(selector.right); + return function (node, ancestry, options) { + if (_right(node, ancestry, options)) { + for (var i = 0, l = ancestry.length; i < l; ++i) { + if (_left(ancestry[i], ancestry.slice(i + 1), options)) { + return true; + } + } } - } + return false; + }; } - - return false; - case 'attribute': { - var p = getPath(node, selector.name); - + var _path = selector.name.split('.'); switch (selector.operator) { case void 0: - return p != null; - + return function (node) { + return getPath(node, _path) != null; + }; case '=': switch (selector.value.type) { case 'regexp': - return typeof p === 'string' && selector.value.value.test(p); - + return function (node) { + var p = getPath(node, _path); + return typeof p === 'string' && selector.value.value.test(p); + }; case 'literal': - return "".concat(selector.value.value) === "".concat(p); - + { + var literal = "".concat(selector.value.value); + return function (node) { + return literal === "".concat(getPath(node, _path)); + }; + } case 'type': - return selector.value.value === _typeof(p); + return function (node) { + return selector.value.value === _typeof(getPath(node, _path)); + }; } - throw new Error("Unknown selector value type: ".concat(selector.value.type)); - case '!=': switch (selector.value.type) { case 'regexp': - return !selector.value.value.test(p); - + return function (node) { + return !selector.value.value.test(getPath(node, _path)); + }; case 'literal': - return "".concat(selector.value.value) !== "".concat(p); - + { + var _literal = "".concat(selector.value.value); + return function (node) { + return _literal !== "".concat(getPath(node, _path)); + }; + } case 'type': - return selector.value.value !== _typeof(p); + return function (node) { + return selector.value.value !== _typeof(getPath(node, _path)); + }; } - throw new Error("Unknown selector value type: ".concat(selector.value.type)); - case '<=': - return p <= selector.value.value; - + return function (node) { + return getPath(node, _path) <= selector.value.value; + }; case '<': - return p < selector.value.value; - + return function (node) { + return getPath(node, _path) < selector.value.value; + }; case '>': - return p > selector.value.value; - + return function (node) { + return getPath(node, _path) > selector.value.value; + }; case '>=': - return p >= selector.value.value; + return function (node) { + return getPath(node, _path) >= selector.value.value; + }; } - throw new Error("Unknown operator: ".concat(selector.operator)); } - case 'sibling': - return matches(node, selector.right, ancestry, options) && sibling(node, selector.left, ancestry, LEFT_SIDE, options) || selector.left.subject && matches(node, selector.left, ancestry, options) && sibling(node, selector.right, ancestry, RIGHT_SIDE, options); - + { + var _left2 = getMatcher(selector.left); + var _right2 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right2(node, ancestry, options) && sibling(node, _left2, ancestry, LEFT_SIDE, options) || selector.left.subject && _left2(node, ancestry, options) && sibling(node, _right2, ancestry, RIGHT_SIDE, options); + }; + } case 'adjacent': - return matches(node, selector.right, ancestry, options) && adjacent(node, selector.left, ancestry, LEFT_SIDE, options) || selector.right.subject && matches(node, selector.left, ancestry, options) && adjacent(node, selector.right, ancestry, RIGHT_SIDE, options); - + { + var _left3 = getMatcher(selector.left); + var _right3 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right3(node, ancestry, options) && adjacent(node, _left3, ancestry, LEFT_SIDE, options) || selector.right.subject && _left3(node, ancestry, options) && adjacent(node, _right3, ancestry, RIGHT_SIDE, options); + }; + } case 'nth-child': - return matches(node, selector.right, ancestry, options) && nthChild(node, ancestry, function () { - return selector.index.value - 1; - }, options); - + { + var nth = selector.index.value; + var _right4 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right4(node, ancestry, options) && nthChild(node, ancestry, nth, options); + }; + } case 'nth-last-child': - return matches(node, selector.right, ancestry, options) && nthChild(node, ancestry, function (length) { - return length - selector.index.value; - }, options); - + { + var _nth = -selector.index.value; + var _right5 = getMatcher(selector.right); + return function (node, ancestry, options) { + return _right5(node, ancestry, options) && nthChild(node, ancestry, _nth, options); + }; + } case 'class': - switch (selector.name.toLowerCase()) { - case 'statement': - if (node.type.slice(-9) === 'Statement') return true; - // fallthrough: interface Declaration <: Statement { } - - case 'declaration': - return node.type.slice(-11) === 'Declaration'; + { + return function (node, ancestry, options) { + if (options && options.matchClass) { + return options.matchClass(selector.name, node, ancestry); + } + if (options && options.nodeTypeKey) return false; + var name = selector.name.toLowerCase(); + switch (name) { + case 'statement': + if (node.type.slice(-9) === 'Statement') return true; + // fallthrough: interface Declaration <: Statement { } + case 'declaration': + return node.type.slice(-11) === 'Declaration'; + case 'pattern': + if (node.type.slice(-7) === 'Pattern') return true; + // fallthrough: interface Expression <: Node, Pattern { } + case 'expression': + return node.type.slice(-10) === 'Expression' || node.type.slice(-7) === 'Literal' || node.type === 'Identifier' && (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty') || node.type === 'MetaProperty'; + case 'function': + return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; + } + throw new Error("Unknown class name: ".concat(selector.name)); + }; + } + } + throw new Error("Unknown selector type: ".concat(selector.type)); + } - case 'pattern': - if (node.type.slice(-7) === 'Pattern') return true; - // fallthrough: interface Expression <: Node, Pattern { } + /** + * @callback TraverseOptionFallback + * @param {external:AST} node The given node. + * @returns {string[]} An array of visitor keys for the given node. + */ - case 'expression': - return node.type.slice(-10) === 'Expression' || node.type.slice(-7) === 'Literal' || node.type === 'Identifier' && (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty') || node.type === 'MetaProperty'; + /** + * @callback ClassMatcher + * @param {string} className The name of the class to match. + * @param {external:AST} node The node to match against. + * @param {Array} ancestry The ancestry of the node. + * @returns {boolean} True if the node matches the class, false if not. + */ - case 'function': - return node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression'; - } + /** + * @typedef {object} ESQueryOptions + * @property {string} [nodeTypeKey="type"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery. + * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node. + * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes. + * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes. + */ - throw new Error("Unknown class name: ".concat(selector.name)); + /** + * Given a `node` and its ancestors, determine if `node` is matched + * by `selector`. + * @param {?external:AST} node + * @param {?SelectorAST} selector + * @param {external:AST[]} [ancestry=[]] + * @param {ESQueryOptions} [options] + * @throws {Error} Unknowns (operator, class name, selector type, or + * selector value type) + * @returns {boolean} + */ + function matches(node, selector, ancestry, options) { + if (!selector) { + return true; } - - throw new Error("Unknown selector type: ".concat(selector.type)); + if (!node) { + return false; + } + if (!ancestry) { + ancestry = []; + } + return getMatcher(selector)(node, ancestry, options); } + /** * Get visitor keys of a given node. * @param {external:AST} node The AST node to get keys. * @param {ESQueryOptions|undefined} options * @returns {string[]} Visitor keys of the node. */ - - function getVisitorKeys(node, options) { - var nodeType = node.type; - + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + var nodeType = node[nodeTypeKey]; if (options && options.visitorKeys && options.visitorKeys[nodeType]) { return options.visitorKeys[nodeType]; } - if (estraverse.VisitorKeys[nodeType]) { return estraverse.VisitorKeys[nodeType]; } - if (options && typeof options.fallback === 'function') { return options.fallback(node); - } // 'iteration' fallback - - + } + // 'iteration' fallback return Object.keys(node).filter(function (key) { - return key !== 'type'; + return key !== nodeTypeKey; }); } + /** * Check whether the given value is an ASTNode or not. * @param {any} node The value to check. + * @param {ESQueryOptions|undefined} options The options to use. * @returns {boolean} `true` if the value is an ASTNode. */ - - - function isNode(node) { - return node !== null && _typeof(node) === 'object' && typeof node.type === 'string'; + function isNode(node, options) { + var nodeTypeKey = options && options.nodeTypeKey || 'type'; + return node !== null && _typeof(node) === 'object' && typeof node[nodeTypeKey] === 'string'; } + /** * Determines if the given node has a sibling that matches the - * given selector. + * given selector matcher. * @param {external:AST} node - * @param {SelectorSequenceAST} selector + * @param {SelectorMatcher} matcher * @param {external:AST[]} ancestry * @param {Side} side * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - - function sibling(node, selector, ancestry, side, options) { + function sibling(node, matcher, ancestry, side, options) { var _ancestry = _slicedToArray(ancestry, 1), - parent = _ancestry[0]; - + parent = _ancestry[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator7 = _createForOfIteratorHelper(keys), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var key = _step7.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var startIndex = listProp.indexOf(node); - - if (startIndex < 0) { - continue; - } - - var lowerBound = void 0, - upperBound = void 0; - - if (side === LEFT_SIDE) { - lowerBound = 0; - upperBound = startIndex; - } else { - lowerBound = startIndex + 1; - upperBound = listProp.length; - } - - for (var k = lowerBound; k < upperBound; ++k) { - if (isNode(listProp[k]) && matches(listProp[k], selector, ancestry, options)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var startIndex = listProp.indexOf(node); + if (startIndex < 0) { + continue; + } + var lowerBound = void 0, + upperBound = void 0; + if (side === LEFT_SIDE) { + lowerBound = 0; + upperBound = startIndex; + } else { + lowerBound = startIndex + 1; + upperBound = listProp.length; + } + for (var k = lowerBound; k < upperBound; ++k) { + if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) { + return true; } } } - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); } - return false; } + /** * Determines if the given node has an adjacent sibling that matches - * the given selector. + * the given selector matcher. * @param {external:AST} node - * @param {SelectorSequenceAST} selector + * @param {SelectorMatcher} matcher * @param {external:AST[]} ancestry * @param {Side} side * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - - function adjacent(node, selector, ancestry, side, options) { + function adjacent(node, matcher, ancestry, side, options) { var _ancestry2 = _slicedToArray(ancestry, 1), - parent = _ancestry2[0]; - + parent = _ancestry2[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator8 = _createForOfIteratorHelper(keys), - _step8; - - try { - for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { - var key = _step8.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var idx = listProp.indexOf(node); - - if (idx < 0) { - continue; - } - - if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1]) && matches(listProp[idx - 1], selector, ancestry, options)) { - return true; - } - - if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1]) && matches(listProp[idx + 1], selector, ancestry, options)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var idx = listProp.indexOf(node); + if (idx < 0) { + continue; + } + if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) { + return true; + } + if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) { + return true; } } - } catch (err) { - _iterator8.e(err); - } finally { - _iterator8.f(); } - return false; } - /** - * @callback IndexFunction - * @param {Integer} len Containing list's length - * @returns {Integer} - */ /** - * Determines if the given node is the nth child, determined by - * `idxFn`, which is given the containing list's length. + * Determines if the given node is the `nth` child. + * If `nth` is negative then the position is counted + * from the end of the list of children. * @param {external:AST} node * @param {external:AST[]} ancestry - * @param {IndexFunction} idxFn + * @param {Integer} nth * @param {ESQueryOptions|undefined} options * @returns {boolean} */ - - - function nthChild(node, ancestry, idxFn, options) { + function nthChild(node, ancestry, nth, options) { + if (nth === 0) { + return false; + } var _ancestry3 = _slicedToArray(ancestry, 1), - parent = _ancestry3[0]; - + parent = _ancestry3[0]; if (!parent) { return false; } - var keys = getVisitorKeys(parent, options); - - var _iterator9 = _createForOfIteratorHelper(keys), - _step9; - - try { - for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { - var key = _step9.value; - var listProp = parent[key]; - - if (Array.isArray(listProp)) { - var idx = listProp.indexOf(node); - - if (idx >= 0 && idx === idxFn(listProp.length)) { - return true; - } + for (var i = 0; i < keys.length; ++i) { + var listProp = parent[keys[i]]; + if (Array.isArray(listProp)) { + var idx = nth < 0 ? listProp.length + nth : nth - 1; + if (idx >= 0 && idx < listProp.length && listProp[idx] === node) { + return true; } } - } catch (err) { - _iterator9.e(err); - } finally { - _iterator9.f(); } - return false; } + /** * For each selector node marked as a subject, find the portion of the * selector that the subject must match. @@ -3863,29 +3201,23 @@ * @param {SelectorAST} [ancestor] Defaults to `selector` * @returns {SelectorAST[]} */ - - function subjects(selector, ancestor) { if (selector == null || _typeof(selector) != 'object') { return []; } - if (ancestor == null) { ancestor = selector; } - var results = selector.subject ? [ancestor] : []; - - for (var _i = 0, _Object$entries = _objectEntries(selector); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - p = _Object$entries$_i[0], - sel = _Object$entries$_i[1]; - + var keys = Object.keys(selector); + for (var i = 0; i < keys.length; ++i) { + var p = keys[i]; + var sel = selector[p]; results.push.apply(results, _toConsumableArray(subjects(sel, p === 'left' ? sel : ancestor))); } - return results; } + /** * @callback TraverseVisitor * @param {?external:AST} node @@ -3902,32 +3234,27 @@ * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function traverse(ast, selector, visitor, options) { if (!selector) { return; } - var ancestry = []; - var altSubjects = subjects(selector); + var matcher = getMatcher(selector); + var altSubjects = subjects(selector).map(getMatcher); estraverse.traverse(ast, { enter: function enter(node, parent) { if (parent != null) { ancestry.unshift(parent); } - - if (matches(node, selector, ancestry, options)) { + if (matcher(node, ancestry, options)) { if (altSubjects.length) { for (var i = 0, l = altSubjects.length; i < l; ++i) { - if (matches(node, altSubjects[i], ancestry, options)) { + if (altSubjects[i](node, ancestry, options)) { visitor(node, parent, ancestry); } - for (var k = 0, m = ancestry.length; k < m; ++k) { var succeedingAncestry = ancestry.slice(k + 1); - - if (matches(ancestry[k], altSubjects[i], succeedingAncestry, options)) { + if (altSubjects[i](ancestry[k], succeedingAncestry, options)) { visitor(ancestry[k], parent, succeedingAncestry); } } @@ -3944,6 +3271,7 @@ fallback: options && options.fallback || 'iteration' }); } + /** * From a JS AST and a selector AST, collect all JS AST nodes that * match the selector. @@ -3952,8 +3280,6 @@ * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function match(ast, selector, options) { var results = []; traverse(ast, selector, function (node) { @@ -3961,16 +3287,16 @@ }, options); return results; } + /** * Parse a selector string and return its AST. * @param {string} selector * @returns {SelectorAST} */ - - function parse(selector) { return parser.parse(selector); } + /** * Query the code AST using the selector string. * @param {external:AST} ast @@ -3978,12 +3304,9 @@ * @param {ESQueryOptions} [options] * @returns {external:AST[]} */ - - function query(ast, selector, options) { return match(ast, parse(selector), options); } - query.parse = parse; query.match = match; query.traverse = traverse; diff --git a/node_modules/esquery/dist/esquery.lite.min.js b/node_modules/esquery/dist/esquery.lite.min.js index 70d7b762a..a1658fe9d 100644 --- a/node_modules/esquery/dist/esquery.lite.min.js +++ b/node_modules/esquery/dist/esquery.lite.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("estraverse")):"function"==typeof define&&define.amd?define(["estraverse"],e):(t=t||self).esquery=e(t.estraverse)}(this,(function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,a=!1,o=void 0;try{for(var u,s=t[Symbol.iterator]();!(n=(u=s.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){a=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,s=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,u=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw u}}}}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){t.exports&&(t.exports=function(){function t(e,r,n,a){this.message=e,this.expected=r,this.found=n,this.location=a,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(t,Error),t.buildMessage=function(t,e){var r={literal:function(t){return'"'+a(t.text)+'"'},class:function(t){var e,r="";for(e=0;e0){for(e=1,n=1;e<~+.]/,h=dt([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),p=vt(">",!1),y=vt("~",!1),v=vt("+",!1),d=vt(",",!1),A=vt("!",!1),x=vt("*",!1),g=vt("#",!1),b=vt("[",!1),m=vt("]",!1),P=/^[>","<","!"],!1,!1),C=vt("=",!1),j=function(t){return(t||"")+"="},S=/^[><]/,E=dt([">","<"],!1,!1),I=vt(".",!1),k=function(t,e,r){return{type:"attribute",name:t,operator:e,value:r}},F=vt('"',!1),T=/^[^\\"]/,L=dt(["\\",'"'],!0,!1),O=vt("\\",!1),D={type:"any"},R=function(t,e){return t+e},K=function(t){return{type:"literal",value:(e=t.join(""),e.replace(/\\(.)/g,(function(t,e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return e}})))};var e},U=vt("'",!1),_=/^[^\\']/,M=dt(["\\","'"],!0,!1),q=/^[0-9]/,G=dt([["0","9"]],!1,!1),H=vt("type(",!1),V=/^[^ )]/,$=dt([" ",")"],!0,!1),z=vt(")",!1),B=/^[imsu]/,J=dt(["i","m","s","u"],!1,!1),N=vt("/",!1),Q=/^[^\/]/,W=dt(["/"],!0,!1),X=vt(":not(",!1),Y=vt(":matches(",!1),Z=vt(":has(",!1),tt=vt(":first-child",!1),et=vt(":last-child",!1),rt=vt(":nth-child(",!1),nt=vt(":nth-last-child(",!1),at=vt(":",!1),ot=vt("statement",!0),ut=vt("expression",!0),st=vt("declaration",!0),ct=vt("function",!0),it=vt("pattern",!0),lt=0,ft=[{line:1,column:1}],ht=0,pt=[],yt={};if("startRule"in r){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=c[r.startRule]}function vt(t,e){return{type:"literal",text:t,ignoreCase:e}}function dt(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function At(t){var r,n=ft[t];if(n)return n;for(r=t-1;!ft[r];)r--;for(n={line:(n=ft[r]).line,column:n.column};rht&&(ht=lt,pt=[]),pt.push(t))}function bt(){var t,e,r,n,a=30*lt+0,o=yt[a];return o?(lt=o.nextPos,o.result):(t=lt,(e=mt())!==s&&(r=Ct())!==s&&mt()!==s?t=e=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(lt=t,t=s),t===s&&(t=lt,(e=mt())!==s&&(e=void 0),t=e),yt[a]={nextPos:lt,result:t},t)}function mt(){var t,r,n=30*lt+1,a=yt[n];if(a)return lt=a.nextPos,a.result;for(t=[],32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l));r!==s;)t.push(r),32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l));return yt[n]={nextPos:lt,result:t},t}function Pt(){var t,r,n,a=30*lt+2,o=yt[a];if(o)return lt=o.nextPos,o.result;if(r=[],f.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(h)),n!==s)for(;n!==s;)r.push(n),f.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(h));else r=s;return r!==s&&(r=r.join("")),t=r,yt[a]={nextPos:lt,result:t},t}function wt(){var t,r,n,a=30*lt+3,o=yt[a];return o?(lt=o.nextPos,o.result):(t=lt,(r=mt())!==s?(62===e.charCodeAt(lt)?(n=">",lt++):(n=s,gt(p)),n!==s&&mt()!==s?t=r="child":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=mt())!==s?(126===e.charCodeAt(lt)?(n="~",lt++):(n=s,gt(y)),n!==s&&mt()!==s?t=r="sibling":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=mt())!==s?(43===e.charCodeAt(lt)?(n="+",lt++):(n=s,gt(v)),n!==s&&mt()!==s?t=r="adjacent":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l)),r!==s&&(n=mt())!==s?t=r="descendant":(lt=t,t=s)))),yt[a]={nextPos:lt,result:t},t)}function Ct(){var t,r,n,a,o,u,c,i,l=30*lt+4,f=yt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=jt())!==s){for(n=[],a=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(u=",",lt++):(u=s,gt(d)),u!==s&&(c=mt())!==s&&(i=jt())!==s?a=o=[o,u,c,i]:(lt=a,a=s)):(lt=a,a=s);a!==s;)n.push(a),a=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(u=",",lt++):(u=s,gt(d)),u!==s&&(c=mt())!==s&&(i=jt())!==s?a=o=[o,u,c,i]:(lt=a,a=s)):(lt=a,a=s);n!==s?t=r=[r].concat(n.map((function(t){return t[3]}))):(lt=t,t=s)}else lt=t,t=s;return yt[l]={nextPos:lt,result:t},t}function jt(){var t,e,r,n,a,o,u,c=30*lt+5,i=yt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,(e=St())!==s){for(r=[],n=lt,(a=wt())!==s&&(o=St())!==s?n=a=[a,o]:(lt=n,n=s);n!==s;)r.push(n),n=lt,(a=wt())!==s&&(o=St())!==s?n=a=[a,o]:(lt=n,n=s);r!==s?(u=e,t=e=r.reduce((function(t,e){return{type:e[0],left:t,right:e[1]}}),u)):(lt=t,t=s)}else lt=t,t=s;return yt[c]={nextPos:lt,result:t},t}function St(){var t,r,n,a,o,u,c,i=30*lt+6,l=yt[i];if(l)return lt=l.nextPos,l.result;if(t=lt,33===e.charCodeAt(lt)?(r="!",lt++):(r=s,gt(A)),r===s&&(r=null),r!==s){if(n=[],(a=Et())!==s)for(;a!==s;)n.push(a),a=Et();else n=s;n!==s?(o=r,c=1===(u=n).length?u[0]:{type:"compound",selectors:u},o&&(c.subject=!0),t=r=c):(lt=t,t=s)}else lt=t,t=s;return yt[i]={nextPos:lt,result:t},t}function Et(){var t,r=30*lt+7,n=yt[r];return n?(lt=n.nextPos,n.result):((t=function(){var t,r,n=30*lt+8,a=yt[n];return a?(lt=a.nextPos,a.result):(42===e.charCodeAt(lt)?(r="*",lt++):(r=s,gt(x)),r!==s&&(r={type:"wildcard",value:r}),t=r,yt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,a=30*lt+9,o=yt[a];return o?(lt=o.nextPos,o.result):(t=lt,35===e.charCodeAt(lt)?(r="#",lt++):(r=s,gt(g)),r===s&&(r=null),r!==s&&(n=Pt())!==s?t=r={type:"identifier",value:n}:(lt=t,t=s),yt[a]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,a,o=30*lt+10,u=yt[o];return u?(lt=u.nextPos,u.result):(t=lt,91===e.charCodeAt(lt)?(r="[",lt++):(r=s,gt(b)),r!==s&&mt()!==s&&(n=function(){var t,r,n,a,o=30*lt+14,u=yt[o];return u?(lt=u.nextPos,u.result):(t=lt,(r=It())!==s&&mt()!==s&&(n=function(){var t,r,n,a=30*lt+12,o=yt[a];return o?(lt=o.nextPos,o.result):(t=lt,33===e.charCodeAt(lt)?(r="!",lt++):(r=s,gt(A)),r===s&&(r=null),r!==s?(61===e.charCodeAt(lt)?(n="=",lt++):(n=s,gt(C)),n!==s?(r=j(r),t=r):(lt=t,t=s)):(lt=t,t=s),yt[a]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?((a=function(){var t,r,n,a,o,u=30*lt+18,c=yt[u];if(c)return lt=c.nextPos,c.result;if(t=lt,"type("===e.substr(lt,5)?(r="type(",lt+=5):(r=s,gt(H)),r!==s)if(mt()!==s){if(n=[],V.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt($)),a!==s)for(;a!==s;)n.push(a),V.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt($));else n=s;n!==s&&(a=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt(z)),o!==s?(r={type:"type",value:n.join("")},t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return yt[u]={nextPos:lt,result:t},t}())===s&&(a=function(){var t,r,n,a,o,u,c=30*lt+20,i=yt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,47===e.charCodeAt(lt)?(r="/",lt++):(r=s,gt(N)),r!==s){if(n=[],Q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(W)),a!==s)for(;a!==s;)n.push(a),Q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(W));else n=s;n!==s?(47===e.charCodeAt(lt)?(a="/",lt++):(a=s,gt(N)),a!==s?((o=function(){var t,r,n=30*lt+19,a=yt[n];if(a)return lt=a.nextPos,a.result;if(t=[],B.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(J)),r!==s)for(;r!==s;)t.push(r),B.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(J));else t=s;return yt[n]={nextPos:lt,result:t},t}())===s&&(o=null),o!==s?(u=o,r={type:"regexp",value:new RegExp(n.join(""),u?u.join(""):"")},t=r):(lt=t,t=s)):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return yt[c]={nextPos:lt,result:t},t}()),a!==s?(r=k(r,n,a),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=It())!==s&&mt()!==s&&(n=function(){var t,r,n,a=30*lt+11,o=yt[a];return o?(lt=o.nextPos,o.result):(t=lt,P.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(w)),r===s&&(r=null),r!==s?(61===e.charCodeAt(lt)?(n="=",lt++):(n=s,gt(C)),n!==s?(r=j(r),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(S.test(e.charAt(lt))?(t=e.charAt(lt),lt++):(t=s,gt(E))),yt[a]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?((a=function(){var t,r,n,a,o,u,c=30*lt+15,i=yt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,34===e.charCodeAt(lt)?(r='"',lt++):(r=s,gt(F)),r!==s){for(n=[],T.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(L)),a===s&&(a=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(u=e.charAt(lt),lt++):(u=s,gt(D)),u!==s?(o=R(o,u),a=o):(lt=a,a=s)):(lt=a,a=s));a!==s;)n.push(a),T.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(L)),a===s&&(a=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(u=e.charAt(lt),lt++):(u=s,gt(D)),u!==s?(o=R(o,u),a=o):(lt=a,a=s)):(lt=a,a=s));n!==s?(34===e.charCodeAt(lt)?(a='"',lt++):(a=s,gt(F)),a!==s?(r=K(n),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;if(t===s)if(t=lt,39===e.charCodeAt(lt)?(r="'",lt++):(r=s,gt(U)),r!==s){for(n=[],_.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(M)),a===s&&(a=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(u=e.charAt(lt),lt++):(u=s,gt(D)),u!==s?(o=R(o,u),a=o):(lt=a,a=s)):(lt=a,a=s));a!==s;)n.push(a),_.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(M)),a===s&&(a=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(u=e.charAt(lt),lt++):(u=s,gt(D)),u!==s?(o=R(o,u),a=o):(lt=a,a=s)):(lt=a,a=s));n!==s?(39===e.charCodeAt(lt)?(a="'",lt++):(a=s,gt(U)),a!==s?(r=K(n),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return yt[c]={nextPos:lt,result:t},t}())===s&&(a=function(){var t,r,n,a,o,u,c,i=30*lt+16,l=yt[i];if(l)return lt=l.nextPos,l.result;for(t=lt,r=lt,n=[],q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G));a!==s;)n.push(a),q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G));if(n!==s?(46===e.charCodeAt(lt)?(a=".",lt++):(a=s,gt(I)),a!==s?r=n=[n,a]:(lt=r,r=s)):(lt=r,r=s),r===s&&(r=null),r!==s){if(n=[],q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G)),a!==s)for(;a!==s;)n.push(a),q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G));else n=s;n!==s?(u=n,c=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(c+u.join(""))},t=r):(lt=t,t=s)}else lt=t,t=s;return yt[i]={nextPos:lt,result:t},t}())===s&&(a=function(){var t,e,r=30*lt+17,n=yt[r];return n?(lt=n.nextPos,n.result):((e=Pt())!==s&&(e={type:"literal",value:e}),t=e,yt[r]={nextPos:lt,result:t},t)}()),a!==s?(r=k(r,n,a),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=It())!==s&&(r={type:"attribute",name:r}),t=r)),yt[o]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?(93===e.charCodeAt(lt)?(a="]",lt++):(a=s,gt(m)),a!==s?t=r=n:(lt=t,t=s)):(lt=t,t=s),yt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,a,o,u,c,i,l=30*lt+21,f=yt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,46===e.charCodeAt(lt)?(r=".",lt++):(r=s,gt(I)),r!==s)if((n=Pt())!==s){for(a=[],o=lt,46===e.charCodeAt(lt)?(u=".",lt++):(u=s,gt(I)),u!==s&&(c=Pt())!==s?o=u=[u,c]:(lt=o,o=s);o!==s;)a.push(o),o=lt,46===e.charCodeAt(lt)?(u=".",lt++):(u=s,gt(I)),u!==s&&(c=Pt())!==s?o=u=[u,c]:(lt=o,o=s);a!==s?(i=n,r={type:"field",name:a.reduce((function(t,e){return t+e[0]+e[1]}),i)},t=r):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return yt[l]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,a,o=30*lt+22,u=yt[o];return u?(lt=u.nextPos,u.result):(t=lt,":not("===e.substr(lt,5)?(r=":not(",lt+=5):(r=s,gt(X)),r!==s&&mt()!==s&&(n=Ct())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(a=")",lt++):(a=s,gt(z)),a!==s?t=r={type:"not",selectors:n}:(lt=t,t=s)):(lt=t,t=s),yt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,a,o=30*lt+23,u=yt[o];return u?(lt=u.nextPos,u.result):(t=lt,":matches("===e.substr(lt,9)?(r=":matches(",lt+=9):(r=s,gt(Y)),r!==s&&mt()!==s&&(n=Ct())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(a=")",lt++):(a=s,gt(z)),a!==s?t=r={type:"matches",selectors:n}:(lt=t,t=s)):(lt=t,t=s),yt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,a,o=30*lt+24,u=yt[o];return u?(lt=u.nextPos,u.result):(t=lt,":has("===e.substr(lt,5)?(r=":has(",lt+=5):(r=s,gt(Z)),r!==s&&mt()!==s&&(n=Ct())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(a=")",lt++):(a=s,gt(z)),a!==s?t=r={type:"has",selectors:n}:(lt=t,t=s)):(lt=t,t=s),yt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n=30*lt+25,a=yt[n];return a?(lt=a.nextPos,a.result):(":first-child"===e.substr(lt,12)?(r=":first-child",lt+=12):(r=s,gt(tt)),r!==s&&(r=kt(1)),t=r,yt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n=30*lt+26,a=yt[n];return a?(lt=a.nextPos,a.result):(":last-child"===e.substr(lt,11)?(r=":last-child",lt+=11):(r=s,gt(et)),r!==s&&(r=Ft(1)),t=r,yt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,a,o,u=30*lt+27,c=yt[u];if(c)return lt=c.nextPos,c.result;if(t=lt,":nth-child("===e.substr(lt,11)?(r=":nth-child(",lt+=11):(r=s,gt(rt)),r!==s)if(mt()!==s){if(n=[],q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G)),a!==s)for(;a!==s;)n.push(a),q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G));else n=s;n!==s&&(a=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt(z)),o!==s?(r=kt(parseInt(n.join(""),10)),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return yt[u]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,a,o,u=30*lt+28,c=yt[u];if(c)return lt=c.nextPos,c.result;if(t=lt,":nth-last-child("===e.substr(lt,16)?(r=":nth-last-child(",lt+=16):(r=s,gt(nt)),r!==s)if(mt()!==s){if(n=[],q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G)),a!==s)for(;a!==s;)n.push(a),q.test(e.charAt(lt))?(a=e.charAt(lt),lt++):(a=s,gt(G));else n=s;n!==s&&(a=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt(z)),o!==s?(r=Ft(parseInt(n.join(""),10)),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return yt[u]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,a=30*lt+29,o=yt[a];return o?(lt=o.nextPos,o.result):(t=lt,58===e.charCodeAt(lt)?(r=":",lt++):(r=s,gt(at)),r!==s?("statement"===e.substr(lt,9).toLowerCase()?(n=e.substr(lt,9),lt+=9):(n=s,gt(ot)),n===s&&("expression"===e.substr(lt,10).toLowerCase()?(n=e.substr(lt,10),lt+=10):(n=s,gt(ut)),n===s&&("declaration"===e.substr(lt,11).toLowerCase()?(n=e.substr(lt,11),lt+=11):(n=s,gt(st)),n===s&&("function"===e.substr(lt,8).toLowerCase()?(n=e.substr(lt,8),lt+=8):(n=s,gt(ct)),n===s&&("pattern"===e.substr(lt,7).toLowerCase()?(n=e.substr(lt,7),lt+=7):(n=s,gt(it)))))),n!==s?t=r={type:"class",name:n}:(lt=t,t=s)):(lt=t,t=s),yt[a]={nextPos:lt,result:t},t)}()),yt[r]={nextPos:lt,result:t},t)}function It(){var t,r,n,a,o,u,c,i,l=30*lt+13,f=yt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=Pt())!==s){for(n=[],a=lt,46===e.charCodeAt(lt)?(o=".",lt++):(o=s,gt(I)),o!==s&&(u=Pt())!==s?a=o=[o,u]:(lt=a,a=s);a!==s;)n.push(a),a=lt,46===e.charCodeAt(lt)?(o=".",lt++):(o=s,gt(I)),o!==s&&(u=Pt())!==s?a=o=[o,u]:(lt=a,a=s);n!==s?(c=r,i=n,t=r=[].concat.apply([c],i).join("")):(lt=t,t=s)}else lt=t,t=s;return yt[l]={nextPos:lt,result:t},t}function kt(t){return{type:"nth-child",index:{type:"literal",value:t}}}function Ft(t){return{type:"nth-last-child",index:{type:"literal",value:t}}}if((n=i())!==s&<===e.length)return n;throw n!==s&<":return j>n.value.value;case">=":return j>=n.value.value}throw new Error("Unknown operator: ".concat(n.operator));case"sibling":return c(r,n.right,a,o)&&f(r,n.left,a,"LEFT_SIDE",o)||n.left.subject&&c(r,n.left,a,o)&&f(r,n.right,a,"RIGHT_SIDE",o);case"adjacent":return c(r,n.right,a,o)&&h(r,n.left,a,"LEFT_SIDE",o)||n.right.subject&&c(r,n.left,a,o)&&h(r,n.right,a,"RIGHT_SIDE",o);case"nth-child":return c(r,n.right,a,o)&&p(r,a,(function(){return n.index.value-1}),o);case"nth-last-child":return c(r,n.right,a,o)&&p(r,a,(function(t){return t-n.index.value}),o);case"class":switch(n.name.toLowerCase()){case"statement":if("Statement"===r.type.slice(-9))return!0;case"declaration":return"Declaration"===r.type.slice(-11);case"pattern":if("Pattern"===r.type.slice(-7))return!0;case"expression":return"Expression"===r.type.slice(-10)||"Literal"===r.type.slice(-7)||"Identifier"===r.type&&(0===a.length||"MetaProperty"!==a[0].type)||"MetaProperty"===r.type;case"function":return"FunctionDeclaration"===r.type||"FunctionExpression"===r.type||"ArrowFunctionExpression"===r.type}throw new Error("Unknown class name: ".concat(n.name))}throw new Error("Unknown selector type: ".concat(n.type))}function i(e,r){var n=e.type;return r&&r.visitorKeys&&r.visitorKeys[n]?r.visitorKeys[n]:t.VisitorKeys[n]?t.VisitorKeys[n]:r&&"function"==typeof r.fallback?r.fallback(e):Object.keys(e).filter((function(t){return"type"!==t}))}function l(t){return null!==t&&"object"===e(t)&&"string"==typeof t.type}function f(t,e,n,a,o){var s=r(n,1)[0];if(!s)return!1;var f,h=u(i(s,o));try{for(h.s();!(f=h.n()).done;){var p=s[f.value];if(Array.isArray(p)){var y=p.indexOf(t);if(y<0)continue;var v=void 0,d=void 0;"LEFT_SIDE"===a?(v=0,d=y):(v=y+1,d=p.length);for(var A=v;A0&&l(p[y-1])&&c(p[y-1],e,n,o))return!0;if("RIGHT_SIDE"===a&&y=0&&f===n(l.length))return!0}}}catch(t){c.e(t)}finally{c.f()}return!1}function y(t,a){if(null==t||"object"!=e(t))return[];null==a&&(a=t);for(var o=t.subject?[a]:[],u=0,s=function(t){for(var e=[],r=Object.keys(t),n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){for(e=1,n=1;e<~+.]/,h=ft([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),p=lt(">",!1),v=lt("~",!1),y=lt("+",!1),d=lt(",",!1),A=lt("!",!1),x=lt("*",!1),g=lt("#",!1),m=lt("[",!1),b=lt("]",!1),P=/^[>","<","!"],!1,!1),w=lt("=",!1),j=function(t){return(t||"")+"="},E=/^[><]/,S=ft([">","<"],!1,!1),k=lt(".",!1),I=function(t,e,r){return{type:"attribute",name:t,operator:e,value:r}},T=lt('"',!1),F=/^[^\\"]/,K=ft(["\\",'"'],!0,!1),O=lt("\\",!1),D={type:"any"},L=function(t,e){return t+e},R=function(t){return{type:"literal",value:(e=t.join(""),e.replace(/\\(.)/g,(function(t,e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return e}})))};var e},M=lt("'",!1),U=/^[^\\']/,_=ft(["\\","'"],!0,!1),q=/^[0-9]/,G=ft([["0","9"]],!1,!1),H=lt("type(",!1),V=/^[^ )]/,W=ft([" ",")"],!0,!1),$=lt(")",!1),z=/^[imsu]/,B=ft(["i","m","s","u"],!1,!1),J=lt("/",!1),N=/^[^\/]/,Q=ft(["/"],!0,!1),X=lt(":not(",!1),Y=lt(":matches(",!1),Z=lt(":has(",!1),tt=lt(":first-child",!1),et=lt(":last-child",!1),rt=lt(":nth-child(",!1),nt=lt(":nth-last-child(",!1),ut=lt(":",!1),ot=0,at=[{line:1,column:1}],st=0,ct=[],it={};if("startRule"in r){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=c[r.startRule]}function lt(t,e){return{type:"literal",text:t,ignoreCase:e}}function ft(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function ht(t){var r,n=at[t];if(n)return n;for(r=t-1;!at[r];)r--;for(n={line:(n=at[r]).line,column:n.column};rst&&(st=ot,ct=[]),ct.push(t))}function yt(){var t,e,r,n,u=30*ot+0,o=it[u];return o?(ot=o.nextPos,o.result):(t=ot,(e=dt())!==s&&(r=gt())!==s&&dt()!==s?t=e=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ot=t,t=s),t===s&&(t=ot,(e=dt())!==s&&(e=void 0),t=e),it[u]={nextPos:ot,result:t},t)}function dt(){var t,r,n=30*ot+1,u=it[n];if(u)return ot=u.nextPos,u.result;for(t=[],32===e.charCodeAt(ot)?(r=" ",ot++):(r=s,vt(l));r!==s;)t.push(r),32===e.charCodeAt(ot)?(r=" ",ot++):(r=s,vt(l));return it[n]={nextPos:ot,result:t},t}function At(){var t,r,n,u=30*ot+2,o=it[u];if(o)return ot=o.nextPos,o.result;if(r=[],f.test(e.charAt(ot))?(n=e.charAt(ot),ot++):(n=s,vt(h)),n!==s)for(;n!==s;)r.push(n),f.test(e.charAt(ot))?(n=e.charAt(ot),ot++):(n=s,vt(h));else r=s;return r!==s&&(r=r.join("")),t=r,it[u]={nextPos:ot,result:t},t}function xt(){var t,r,n,u=30*ot+3,o=it[u];return o?(ot=o.nextPos,o.result):(t=ot,(r=dt())!==s?(62===e.charCodeAt(ot)?(n=">",ot++):(n=s,vt(p)),n!==s&&dt()!==s?t=r="child":(ot=t,t=s)):(ot=t,t=s),t===s&&(t=ot,(r=dt())!==s?(126===e.charCodeAt(ot)?(n="~",ot++):(n=s,vt(v)),n!==s&&dt()!==s?t=r="sibling":(ot=t,t=s)):(ot=t,t=s),t===s&&(t=ot,(r=dt())!==s?(43===e.charCodeAt(ot)?(n="+",ot++):(n=s,vt(y)),n!==s&&dt()!==s?t=r="adjacent":(ot=t,t=s)):(ot=t,t=s),t===s&&(t=ot,32===e.charCodeAt(ot)?(r=" ",ot++):(r=s,vt(l)),r!==s&&(n=dt())!==s?t=r="descendant":(ot=t,t=s)))),it[u]={nextPos:ot,result:t},t)}function gt(){var t,r,n,u,o,a,c,i,l=30*ot+4,f=it[l];if(f)return ot=f.nextPos,f.result;if(t=ot,(r=mt())!==s){for(n=[],u=ot,(o=dt())!==s?(44===e.charCodeAt(ot)?(a=",",ot++):(a=s,vt(d)),a!==s&&(c=dt())!==s&&(i=mt())!==s?u=o=[o,a,c,i]:(ot=u,u=s)):(ot=u,u=s);u!==s;)n.push(u),u=ot,(o=dt())!==s?(44===e.charCodeAt(ot)?(a=",",ot++):(a=s,vt(d)),a!==s&&(c=dt())!==s&&(i=mt())!==s?u=o=[o,a,c,i]:(ot=u,u=s)):(ot=u,u=s);n!==s?t=r=[r].concat(n.map((function(t){return t[3]}))):(ot=t,t=s)}else ot=t,t=s;return it[l]={nextPos:ot,result:t},t}function mt(){var t,e,r,n,u,o,a,c=30*ot+5,i=it[c];if(i)return ot=i.nextPos,i.result;if(t=ot,(e=bt())!==s){for(r=[],n=ot,(u=xt())!==s&&(o=bt())!==s?n=u=[u,o]:(ot=n,n=s);n!==s;)r.push(n),n=ot,(u=xt())!==s&&(o=bt())!==s?n=u=[u,o]:(ot=n,n=s);r!==s?(a=e,t=e=r.reduce((function(t,e){return{type:e[0],left:t,right:e[1]}}),a)):(ot=t,t=s)}else ot=t,t=s;return it[c]={nextPos:ot,result:t},t}function bt(){var t,r,n,u,o,a,c,i=30*ot+6,l=it[i];if(l)return ot=l.nextPos,l.result;if(t=ot,33===e.charCodeAt(ot)?(r="!",ot++):(r=s,vt(A)),r===s&&(r=null),r!==s){if(n=[],(u=Pt())!==s)for(;u!==s;)n.push(u),u=Pt();else n=s;n!==s?(o=r,c=1===(a=n).length?a[0]:{type:"compound",selectors:a},o&&(c.subject=!0),t=r=c):(ot=t,t=s)}else ot=t,t=s;return it[i]={nextPos:ot,result:t},t}function Pt(){var t,r=30*ot+7,n=it[r];return n?(ot=n.nextPos,n.result):((t=function(){var t,r,n=30*ot+8,u=it[n];return u?(ot=u.nextPos,u.result):(42===e.charCodeAt(ot)?(r="*",ot++):(r=s,vt(x)),r!==s&&(r={type:"wildcard",value:r}),t=r,it[n]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n,u=30*ot+9,o=it[u];return o?(ot=o.nextPos,o.result):(t=ot,35===e.charCodeAt(ot)?(r="#",ot++):(r=s,vt(g)),r===s&&(r=null),r!==s&&(n=At())!==s?t=r={type:"identifier",value:n}:(ot=t,t=s),it[u]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=30*ot+10,a=it[o];return a?(ot=a.nextPos,a.result):(t=ot,91===e.charCodeAt(ot)?(r="[",ot++):(r=s,vt(m)),r!==s&&dt()!==s&&(n=function(){var t,r,n,u,o=30*ot+14,a=it[o];return a?(ot=a.nextPos,a.result):(t=ot,(r=Ct())!==s&&dt()!==s&&(n=function(){var t,r,n,u=30*ot+12,o=it[u];return o?(ot=o.nextPos,o.result):(t=ot,33===e.charCodeAt(ot)?(r="!",ot++):(r=s,vt(A)),r===s&&(r=null),r!==s?(61===e.charCodeAt(ot)?(n="=",ot++):(n=s,vt(w)),n!==s?(r=j(r),t=r):(ot=t,t=s)):(ot=t,t=s),it[u]={nextPos:ot,result:t},t)}())!==s&&dt()!==s?((u=function(){var t,r,n,u,o,a=30*ot+18,c=it[a];if(c)return ot=c.nextPos,c.result;if(t=ot,"type("===e.substr(ot,5)?(r="type(",ot+=5):(r=s,vt(H)),r!==s)if(dt()!==s){if(n=[],V.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(W)),u!==s)for(;u!==s;)n.push(u),V.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(W));else n=s;n!==s&&(u=dt())!==s?(41===e.charCodeAt(ot)?(o=")",ot++):(o=s,vt($)),o!==s?(r={type:"type",value:n.join("")},t=r):(ot=t,t=s)):(ot=t,t=s)}else ot=t,t=s;else ot=t,t=s;return it[a]={nextPos:ot,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c=30*ot+20,i=it[c];if(i)return ot=i.nextPos,i.result;if(t=ot,47===e.charCodeAt(ot)?(r="/",ot++):(r=s,vt(J)),r!==s){if(n=[],N.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(Q)),u!==s)for(;u!==s;)n.push(u),N.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(Q));else n=s;n!==s?(47===e.charCodeAt(ot)?(u="/",ot++):(u=s,vt(J)),u!==s?((o=function(){var t,r,n=30*ot+19,u=it[n];if(u)return ot=u.nextPos,u.result;if(t=[],z.test(e.charAt(ot))?(r=e.charAt(ot),ot++):(r=s,vt(B)),r!==s)for(;r!==s;)t.push(r),z.test(e.charAt(ot))?(r=e.charAt(ot),ot++):(r=s,vt(B));else t=s;return it[n]={nextPos:ot,result:t},t}())===s&&(o=null),o!==s?(a=o,r={type:"regexp",value:new RegExp(n.join(""),a?a.join(""):"")},t=r):(ot=t,t=s)):(ot=t,t=s)):(ot=t,t=s)}else ot=t,t=s;return it[c]={nextPos:ot,result:t},t}()),u!==s?(r=I(r,n,u),t=r):(ot=t,t=s)):(ot=t,t=s),t===s&&(t=ot,(r=Ct())!==s&&dt()!==s&&(n=function(){var t,r,n,u=30*ot+11,o=it[u];return o?(ot=o.nextPos,o.result):(t=ot,P.test(e.charAt(ot))?(r=e.charAt(ot),ot++):(r=s,vt(C)),r===s&&(r=null),r!==s?(61===e.charCodeAt(ot)?(n="=",ot++):(n=s,vt(w)),n!==s?(r=j(r),t=r):(ot=t,t=s)):(ot=t,t=s),t===s&&(E.test(e.charAt(ot))?(t=e.charAt(ot),ot++):(t=s,vt(S))),it[u]={nextPos:ot,result:t},t)}())!==s&&dt()!==s?((u=function(){var t,r,n,u,o,a,c=30*ot+15,i=it[c];if(i)return ot=i.nextPos,i.result;if(t=ot,34===e.charCodeAt(ot)?(r='"',ot++):(r=s,vt(T)),r!==s){for(n=[],F.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(K)),u===s&&(u=ot,92===e.charCodeAt(ot)?(o="\\",ot++):(o=s,vt(O)),o!==s?(e.length>ot?(a=e.charAt(ot),ot++):(a=s,vt(D)),a!==s?(o=L(o,a),u=o):(ot=u,u=s)):(ot=u,u=s));u!==s;)n.push(u),F.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(K)),u===s&&(u=ot,92===e.charCodeAt(ot)?(o="\\",ot++):(o=s,vt(O)),o!==s?(e.length>ot?(a=e.charAt(ot),ot++):(a=s,vt(D)),a!==s?(o=L(o,a),u=o):(ot=u,u=s)):(ot=u,u=s));n!==s?(34===e.charCodeAt(ot)?(u='"',ot++):(u=s,vt(T)),u!==s?(r=R(n),t=r):(ot=t,t=s)):(ot=t,t=s)}else ot=t,t=s;if(t===s)if(t=ot,39===e.charCodeAt(ot)?(r="'",ot++):(r=s,vt(M)),r!==s){for(n=[],U.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(_)),u===s&&(u=ot,92===e.charCodeAt(ot)?(o="\\",ot++):(o=s,vt(O)),o!==s?(e.length>ot?(a=e.charAt(ot),ot++):(a=s,vt(D)),a!==s?(o=L(o,a),u=o):(ot=u,u=s)):(ot=u,u=s));u!==s;)n.push(u),U.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(_)),u===s&&(u=ot,92===e.charCodeAt(ot)?(o="\\",ot++):(o=s,vt(O)),o!==s?(e.length>ot?(a=e.charAt(ot),ot++):(a=s,vt(D)),a!==s?(o=L(o,a),u=o):(ot=u,u=s)):(ot=u,u=s));n!==s?(39===e.charCodeAt(ot)?(u="'",ot++):(u=s,vt(M)),u!==s?(r=R(n),t=r):(ot=t,t=s)):(ot=t,t=s)}else ot=t,t=s;return it[c]={nextPos:ot,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c,i=30*ot+16,l=it[i];if(l)return ot=l.nextPos,l.result;for(t=ot,r=ot,n=[],q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G));u!==s;)n.push(u),q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G));if(n!==s?(46===e.charCodeAt(ot)?(u=".",ot++):(u=s,vt(k)),u!==s?r=n=[n,u]:(ot=r,r=s)):(ot=r,r=s),r===s&&(r=null),r!==s){if(n=[],q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G)),u!==s)for(;u!==s;)n.push(u),q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G));else n=s;n!==s?(a=n,c=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(c+a.join(""))},t=r):(ot=t,t=s)}else ot=t,t=s;return it[i]={nextPos:ot,result:t},t}())===s&&(u=function(){var t,e,r=30*ot+17,n=it[r];return n?(ot=n.nextPos,n.result):((e=At())!==s&&(e={type:"literal",value:e}),t=e,it[r]={nextPos:ot,result:t},t)}()),u!==s?(r=I(r,n,u),t=r):(ot=t,t=s)):(ot=t,t=s),t===s&&(t=ot,(r=Ct())!==s&&(r={type:"attribute",name:r}),t=r)),it[o]={nextPos:ot,result:t},t)}())!==s&&dt()!==s?(93===e.charCodeAt(ot)?(u="]",ot++):(u=s,vt(b)),u!==s?t=r=n:(ot=t,t=s)):(ot=t,t=s),it[o]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a,c,i,l=30*ot+21,f=it[l];if(f)return ot=f.nextPos,f.result;if(t=ot,46===e.charCodeAt(ot)?(r=".",ot++):(r=s,vt(k)),r!==s)if((n=At())!==s){for(u=[],o=ot,46===e.charCodeAt(ot)?(a=".",ot++):(a=s,vt(k)),a!==s&&(c=At())!==s?o=a=[a,c]:(ot=o,o=s);o!==s;)u.push(o),o=ot,46===e.charCodeAt(ot)?(a=".",ot++):(a=s,vt(k)),a!==s&&(c=At())!==s?o=a=[a,c]:(ot=o,o=s);u!==s?(i=n,r={type:"field",name:u.reduce((function(t,e){return t+e[0]+e[1]}),i)},t=r):(ot=t,t=s)}else ot=t,t=s;else ot=t,t=s;return it[l]={nextPos:ot,result:t},t}())===s&&(t=function(){var t,r,n,u,o=30*ot+22,a=it[o];return a?(ot=a.nextPos,a.result):(t=ot,":not("===e.substr(ot,5)?(r=":not(",ot+=5):(r=s,vt(X)),r!==s&&dt()!==s&&(n=gt())!==s&&dt()!==s?(41===e.charCodeAt(ot)?(u=")",ot++):(u=s,vt($)),u!==s?t=r={type:"not",selectors:n}:(ot=t,t=s)):(ot=t,t=s),it[o]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=30*ot+23,a=it[o];return a?(ot=a.nextPos,a.result):(t=ot,":matches("===e.substr(ot,9)?(r=":matches(",ot+=9):(r=s,vt(Y)),r!==s&&dt()!==s&&(n=gt())!==s&&dt()!==s?(41===e.charCodeAt(ot)?(u=")",ot++):(u=s,vt($)),u!==s?t=r={type:"matches",selectors:n}:(ot=t,t=s)):(ot=t,t=s),it[o]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=30*ot+24,a=it[o];return a?(ot=a.nextPos,a.result):(t=ot,":has("===e.substr(ot,5)?(r=":has(",ot+=5):(r=s,vt(Z)),r!==s&&dt()!==s&&(n=gt())!==s&&dt()!==s?(41===e.charCodeAt(ot)?(u=")",ot++):(u=s,vt($)),u!==s?t=r={type:"has",selectors:n}:(ot=t,t=s)):(ot=t,t=s),it[o]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n=30*ot+25,u=it[n];return u?(ot=u.nextPos,u.result):(":first-child"===e.substr(ot,12)?(r=":first-child",ot+=12):(r=s,vt(tt)),r!==s&&(r=wt(1)),t=r,it[n]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n=30*ot+26,u=it[n];return u?(ot=u.nextPos,u.result):(":last-child"===e.substr(ot,11)?(r=":last-child",ot+=11):(r=s,vt(et)),r!==s&&(r=jt(1)),t=r,it[n]={nextPos:ot,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a=30*ot+27,c=it[a];if(c)return ot=c.nextPos,c.result;if(t=ot,":nth-child("===e.substr(ot,11)?(r=":nth-child(",ot+=11):(r=s,vt(rt)),r!==s)if(dt()!==s){if(n=[],q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G)),u!==s)for(;u!==s;)n.push(u),q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G));else n=s;n!==s&&(u=dt())!==s?(41===e.charCodeAt(ot)?(o=")",ot++):(o=s,vt($)),o!==s?(r=wt(parseInt(n.join(""),10)),t=r):(ot=t,t=s)):(ot=t,t=s)}else ot=t,t=s;else ot=t,t=s;return it[a]={nextPos:ot,result:t},t}())===s&&(t=function(){var t,r,n,u,o,a=30*ot+28,c=it[a];if(c)return ot=c.nextPos,c.result;if(t=ot,":nth-last-child("===e.substr(ot,16)?(r=":nth-last-child(",ot+=16):(r=s,vt(nt)),r!==s)if(dt()!==s){if(n=[],q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G)),u!==s)for(;u!==s;)n.push(u),q.test(e.charAt(ot))?(u=e.charAt(ot),ot++):(u=s,vt(G));else n=s;n!==s&&(u=dt())!==s?(41===e.charCodeAt(ot)?(o=")",ot++):(o=s,vt($)),o!==s?(r=jt(parseInt(n.join(""),10)),t=r):(ot=t,t=s)):(ot=t,t=s)}else ot=t,t=s;else ot=t,t=s;return it[a]={nextPos:ot,result:t},t}())===s&&(t=function(){var t,r,n,u=30*ot+29,o=it[u];return o?(ot=o.nextPos,o.result):(t=ot,58===e.charCodeAt(ot)?(r=":",ot++):(r=s,vt(ut)),r!==s&&(n=At())!==s?t=r={type:"class",name:n}:(ot=t,t=s),it[u]={nextPos:ot,result:t},t)}()),it[r]={nextPos:ot,result:t},t)}function Ct(){var t,r,n,u,o,a,c,i,l=30*ot+13,f=it[l];if(f)return ot=f.nextPos,f.result;if(t=ot,(r=At())!==s){for(n=[],u=ot,46===e.charCodeAt(ot)?(o=".",ot++):(o=s,vt(k)),o!==s&&(a=At())!==s?u=o=[o,a]:(ot=u,u=s);u!==s;)n.push(u),u=ot,46===e.charCodeAt(ot)?(o=".",ot++):(o=s,vt(k)),o!==s&&(a=At())!==s?u=o=[o,a]:(ot=u,u=s);n!==s?(c=r,i=n,t=r=[].concat.apply([c],i).join("")):(ot=t,t=s)}else ot=t,t=s;return it[l]={nextPos:ot,result:t},t}function wt(t){return{type:"nth-child",index:{type:"literal",value:t}}}function jt(t){return{type:"nth-last-child",index:{type:"literal",value:t}}}if((n=i())!==s&&ot===e.length)return n;throw n!==s&&ot0&&h(t,e,r))&&f(e[0],e.slice(1),r)};case"descendant":var d=i(r.left),A=i(r.right);return function(t,e,r){if(A(t,e,r))for(var n=0,u=e.length;n":return function(t){return s(t,x)>r.value.value};case">=":return function(t){return s(t,x)>=r.value.value}}throw new Error("Unknown operator: ".concat(r.operator));case"sibling":var b=i(r.left),P=i(r.right);return function(t,e,n){return P(t,e,n)&&p(t,b,e,"LEFT_SIDE",n)||r.left.subject&&b(t,e,n)&&p(t,P,e,"RIGHT_SIDE",n)};case"adjacent":var C=i(r.left),w=i(r.right);return function(t,e,n){return w(t,e,n)&&v(t,C,e,"LEFT_SIDE",n)||r.right.subject&&C(t,e,n)&&v(t,w,e,"RIGHT_SIDE",n)};case"nth-child":var j=r.index.value,E=i(r.right);return function(t,e,r){return E(t,e,r)&&y(t,e,j,r)};case"nth-last-child":var S=-r.index.value,k=i(r.right);return function(t,e,r){return k(t,e,r)&&y(t,e,S,r)};case"class":return function(t,e,n){if(n&&n.matchClass)return n.matchClass(r.name,t,e);if(n&&n.nodeTypeKey)return!1;switch(r.name.toLowerCase()){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===e.length||"MetaProperty"!==e[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(r.name))}}throw new Error("Unknown selector type: ".concat(r.type))}function f(e,r){var n=r&&r.nodeTypeKey||"type",u=e[n];return r&&r.visitorKeys&&r.visitorKeys[u]?r.visitorKeys[u]:t.VisitorKeys[u]?t.VisitorKeys[u]:r&&"function"==typeof r.fallback?r.fallback(e):Object.keys(e).filter((function(t){return t!==n}))}function h(t,r){var n=r&&r.nodeTypeKey||"type";return null!==t&&"object"===e(t)&&"string"==typeof t[n]}function p(t,e,n,u,o){var a=r(n,1)[0];if(!a)return!1;for(var s=f(a,o),c=0;c0&&h(i[l-1],o)&&e(i[l-1],n,o))return!0;if("RIGHT_SIDE"===u&&l=0&&i 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[>\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = \"statement\",\n peg$c103 = peg$literalExpectation(\"statement\", true),\n peg$c104 = \"expression\",\n peg$c105 = peg$literalExpectation(\"expression\", true),\n peg$c106 = \"declaration\",\n peg$c107 = peg$literalExpectation(\"declaration\", true),\n peg$c108 = \"function\",\n peg$c109 = peg$literalExpectation(\"function\", true),\n peg$c110 = \"pattern\",\n peg$c111 = peg$literalExpectation(\"pattern\", true),\n peg$c112 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) {\n s2 = input.substr(peg$currPos, 9);\n peg$currPos += 9;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c103); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) {\n s2 = input.substr(peg$currPos, 10);\n peg$currPos += 10;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c105); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) {\n s2 = input.substr(peg$currPos, 11);\n peg$currPos += 11;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c107); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) {\n s2 = input.substr(peg$currPos, 8);\n peg$currPos += 8;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c109); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) {\n s2 = input.substr(peg$currPos, 7);\n peg$currPos += 7;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c111); }\n }\n }\n }\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c112(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string} key\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, key) {\n const keys = key.split('.');\n for (const key of keys) {\n if (obj == null) { return obj; }\n obj = obj[key];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path) {\n if (path.length === 0) { return node === ancestor; }\n if (ancestor == null) { return false; }\n const field = ancestor[path[0]];\n const remainingPath = path.slice(1);\n if (Array.isArray(field)) {\n for (const component of field) {\n if (inPath(node, component, remainingPath)) { return true; }\n }\n return false;\n } else {\n return inPath(node, field, remainingPath);\n }\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n/**\n * @typedef {object} ESQueryOptions\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n switch(selector.type) {\n case 'wildcard':\n return true;\n\n case 'identifier':\n return selector.value.toLowerCase() === node.type.toLowerCase();\n\n case 'field': {\n const path = selector.name.split('.');\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path);\n\n }\n case 'matches':\n for (const sel of selector.selectors) {\n if (matches(node, sel, ancestry, options)) { return true; }\n }\n return false;\n\n case 'compound':\n for (const sel of selector.selectors) {\n if (!matches(node, sel, ancestry, options)) { return false; }\n }\n return true;\n\n case 'not':\n for (const sel of selector.selectors) {\n if (matches(node, sel, ancestry, options)) { return false; }\n }\n return true;\n\n case 'has': {\n const collector = [];\n for (const sel of selector.selectors) {\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n if (matches(node, sel, a, options)) {\n collector.push(node);\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n }\n return collector.length !== 0;\n\n }\n case 'child':\n if (matches(node, selector.right, ancestry, options)) {\n return matches(ancestry[0], selector.left, ancestry.slice(1), options);\n }\n return false;\n\n case 'descendant':\n if (matches(node, selector.right, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (matches(ancestry[i], selector.left, ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n\n case 'attribute': {\n const p = getPath(node, selector.name);\n switch (selector.operator) {\n case void 0:\n return p != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp': return typeof p === 'string' && selector.value.value.test(p);\n case 'literal': return `${selector.value.value}` === `${p}`;\n case 'type': return selector.value.value === typeof p;\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp': return !selector.value.value.test(p);\n case 'literal': return `${selector.value.value}` !== `${p}`;\n case 'type': return selector.value.value !== typeof p;\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=': return p <= selector.value.value;\n case '<': return p < selector.value.value;\n case '>': return p > selector.value.value;\n case '>=': return p >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n case 'sibling':\n return matches(node, selector.right, ancestry, options) &&\n sibling(node, selector.left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n matches(node, selector.left, ancestry, options) &&\n sibling(node, selector.right, ancestry, RIGHT_SIDE, options);\n case 'adjacent':\n return matches(node, selector.right, ancestry, options) &&\n adjacent(node, selector.left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n matches(node, selector.left, ancestry, options) &&\n adjacent(node, selector.right, ancestry, RIGHT_SIDE, options);\n\n case 'nth-child':\n return matches(node, selector.right, ancestry, options) &&\n nthChild(node, ancestry, function () {\n return selector.index.value - 1;\n }, options);\n\n case 'nth-last-child':\n return matches(node, selector.right, ancestry, options) &&\n nthChild(node, ancestry, function (length) {\n return length - selector.index.value;\n }, options);\n\n case 'class':\n switch(selector.name.toLowerCase()){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeType = node.type;\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== 'type';\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node) {\n return node !== null && typeof node === 'object' && typeof node.type === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector.\n * @param {external:AST} node\n * @param {SelectorSequenceAST} selector\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, selector, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k]) && matches(listProp[k], selector, ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector.\n * @param {external:AST} node\n * @param {SelectorSequenceAST} selector\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, selector, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1]) && matches(listProp[idx - 1], selector, ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1]) && matches(listProp[idx + 1], selector, ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n* @callback IndexFunction\n* @param {Integer} len Containing list's length\n* @returns {Integer}\n*/\n\n/**\n * Determines if the given node is the nth child, determined by\n * `idxFn`, which is given the containing list's length.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {IndexFunction} idxFn\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, idxFn, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx >= 0 && idx === idxFn(listProp.length)) { return true; }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n for (const [p, sel] of Object.entries(selector)) {\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const altSubjects = subjects(selector);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matches(node, selector, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (matches(node, altSubjects[i], ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (matches(ancestry[k], altSubjects[i], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["module","exports","peg$SyntaxError","message","expected","found","location","name","Error","captureStackTrace","this","child","parent","ctor","constructor","prototype","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","i","escapedParts","parts","length","Array","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","replace","j","descriptions","type","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$c103","peg$c105","peg$c107","peg$c109","peg$c111","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$resultsCache","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","push","s0","s1","s2","ss","key","cached","nextPos","result","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","toLowerCase","peg$parseclass","n","index","factory","matches","node","selector","ancestry","path","split","ancestor","inPath","field","remainingPath","isArray","sel","collector","estraverse","traverse","enter","unshift","leave","shift","keys","visitorKeys","fallback","l","obj","getPath","sibling","adjacent","nthChild","getVisitorKeys","nodeType","VisitorKeys","Object","filter","isNode","_typeof","side","listProp","startIndex","indexOf","lowerBound","upperBound","k","idx","idxFn","subjects","results","_objectEntries","ast","visitor","altSubjects","m","succeedingAncestry","parser","query"],"mappings":"uoFAQ2CA,EAAOC,UAC9CD,UAEK,oBASEE,EAAgBC,EAASC,EAAUC,EAAOC,QAC5CH,QAAWA,OACXC,SAAWA,OACXC,MAAWA,OACXC,SAAWA,OACXC,KAAW,cAEuB,mBAA5BC,MAAMC,mBACfD,MAAMC,kBAAkBC,KAAMR,mBAdZS,EAAOC,YAClBC,SAAcC,YAAcH,EACrCE,EAAKE,UAAYH,EAAOG,UACxBJ,EAAMI,UAAY,IAAIF,EAexBG,CAAad,EAAiBM,OAE9BN,EAAgBe,aAAe,SAASb,EAAUC,OAC5Ca,EAA2B,CACzBC,QAAS,SAASC,SACT,IAAOC,EAAcD,EAAYE,MAAQ,WAGzC,SAASF,OAEZG,EADAC,EAAe,OAGdD,EAAI,EAAGA,EAAIH,EAAYK,MAAMC,OAAQH,IACxC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AAKlN,EAAG,CAC5C4L,EAAQC,EAAMgD,EAAY7O,GAAI+L,EAAUlK,IACxC+M,EAAQ/C,EAAMxM,EAAQ0M,OAErB,IAAIsC,EAAI,EAAGS,EAAI/C,EAAS5L,OAAQkO,EAAIS,IAAKT,EAAG,KACvCU,EAAqBhD,EAASzK,MAAM+M,EAAI,GAC1CzC,EAAQG,EAASsC,GAAIQ,EAAY7O,GAAI+O,EAAoBlN,IACzD+M,EAAQ7C,EAASsC,GAAIhP,EAAQ0P,SAKzCH,EAAQ/C,EAAMxM,EAAQ0M,IAIlCc,iBAAWd,EAASe,SACpBC,KAAMlL,GAAWA,EAAQmL,YACzBC,SAAUpL,GAAWA,EAAQoL,UAAY,eAajD,SAAS1I,EAAMoK,EAAK7C,EAAUjK,OACpB4M,EAAU,UAChB/B,EAASiC,EAAK7C,GAAU,SAAUD,GAC9B4C,EAAQlH,KAAKsE,KACdhK,GACI4M,EAQX,SAAS9M,EAAMmK,UACJkD,EAAOrN,MAAMmK,GAUxB,SAASmD,EAAMN,EAAK7C,EAAUjK,UACnB0C,EAAMoK,EAAKhN,EAAMmK,GAAWjK,UAGvCoN,EAAMtN,MAAQA,EACdsN,EAAM1K,MAAQA,EACd0K,EAAMvC,SAAWA,EACjBuC,EAAMrD,QAAUA,EAChBqD,EAAMA,MAAQA"} \ No newline at end of file +{"version":3,"file":"esquery.lite.min.js","sources":["../parser.js","../esquery.js"],"sourcesContent":["/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[>\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c102(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @typedef {function} SelectorMatcher\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false;\n \n const name = selector.name.toLowerCase();\n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["module","exports","peg$SyntaxError","message","expected","found","location","this","name","Error","captureStackTrace","child","parent","ctor","constructor","prototype","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","i","escapedParts","parts","length","Array","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","replace","j","descriptions","type","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$resultsCache","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","push","s0","s1","s2","ss","key","cached","nextPos","result","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","obj","keys","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","node","ancestry","nodeTypeKey","path","split","inPath","ancestor","fromPathIndex","current","field","isArray","k","matchers","estraverse","traverse","enter","unshift","leave","shift","visitorKeys","fallback","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","nodeType","VisitorKeys","Object","filter","isNode","_typeof","side","listProp","startIndex","indexOf","lowerBound","upperBound","idx","ast","visitor","altSubjects","subjects","results","sel","m","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SAASnN,EAAMiK,GACX,OAAOsD,EAAOvN,MAAMiK,GAUxB,SAASuD,EAAMT,EAAK9C,EAAU/J,GAC1B,OAAO0C,EAAMmK,EAAK/M,EAAMiK,GAAW/J,UAGvCsN,EAAMxN,MAAQA,EACdwN,EAAM5K,MAAQA,EACd4K,EAAMnC,SAAWA,EACjBmC,EAAMC,QAvPN,SAAiBlD,EAAMN,EAAUO,EAAUtK,GACvC,OAAK+J,KACAM,IACAC,IAAYA,EAAW,IAErBR,EAAWC,EAAXD,CAAqBO,EAAMC,EAAUtK,KAmPhDsN,EAAMA,MAAQA"} \ No newline at end of file diff --git a/node_modules/esquery/dist/esquery.min.js b/node_modules/esquery/dist/esquery.min.js index 279d1c73f..c1ca84380 100644 --- a/node_modules/esquery/dist/esquery.min.js +++ b/node_modules/esquery/dist/esquery.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).esquery=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(e,t){return e(t={exports:{}},t.exports),t.exports}var s=i((function(e,t){!function e(t){var r,n,o,a,i,s;function l(e){var t,r,n={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],n[t]="object"==typeof r&&null!==r?l(r):r);return n}function u(e,t){this.parent=e,this.key=t}function c(e,t,r,n){this.node=e,this.path=t,this.wrap=r,this.ref=n}function f(){}function p(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function h(e,t){return(e===r.ObjectExpression||e===r.ObjectPattern)&&"properties"===t}function y(e,t){for(var r=e.length-1;r>=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,o,a;for(n=e.length,o=0;n;)t(e[a=o+(r=n>>>1)])?n=r:(o=a+1,n-=r+1);return o}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:a={},Skip:i={},Remove:s={}},u.prototype.replace=function(e){this.parent[this.key]=e},u.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,o;function a(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(l,x[d]))o=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;o=new c(v[m],[f,m],null,null)}r.push(o)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(o=n.pop(),u=this.__execute(t.leave,o),this.__state===a||u===a)return},f.prototype.replace=function(e,t){var r,n,o,l,f,y,d,m,x,v,g,b,A;function E(e){var t,n,o,a;if(e.ref.remove())for(n=e.ref.key,a=e.ref.parent,t=r.length;t--;)if((o=r[t]).ref&&o.ref.parent===a){if(o.ref.key=0;)if(v=o[A=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(l,x[d]))y=new c(v[m],[A,m],"Property",new u(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[A,m],null,new u(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,A,null,new u(o,A)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==a&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||E(y),this.__state===a||f===a)return b.root;return b.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var o,a,i,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,a=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?n.Break:u[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=o,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),l=i((function(e){e.exports&&(e.exports=function(){function e(t,r,n,o){this.message=t,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=me([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=de(">",!1),y=de("~",!1),d=de("+",!1),m=de(",",!1),x=de("!",!1),v=de("*",!1),g=de("#",!1),b=de("[",!1),A=de("]",!1),E=/^[>","<","!"],!1,!1),_=de("=",!1),w=function(e){return(e||"")+"="},C=/^[><]/,P=me([">","<"],!1,!1),k=de(".",!1),D=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},j=de('"',!1),I=/^[^\\"]/,T=me(["\\",'"'],!0,!1),F=de("\\",!1),L={type:"any"},O=function(e,t){return e+t},R=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},B=de("'",!1),M=/^[^\\']/,U=me(["\\","'"],!0,!1),q=/^[0-9]/,V=me([["0","9"]],!1,!1),N=de("type(",!1),W=/^[^ )]/,K=me([" ",")"],!0,!1),G=de(")",!1),z=/^[imsu]/,H=me(["i","m","s","u"],!1,!1),Y=de("/",!1),$=/^[^\/]/,J=me(["/"],!0,!1),Q=de(":not(",!1),X=de(":matches(",!1),Z=de(":has(",!1),ee=de(":first-child",!1),te=de(":last-child",!1),re=de(":nth-child(",!1),ne=de(":nth-last-child(",!1),oe=de(":",!1),ae=de("statement",!0),ie=de("expression",!0),se=de("declaration",!0),le=de("function",!0),ue=de("pattern",!0),ce=0,fe=[{line:1,column:1}],pe=0,he=[],ye={};if("startRule"in r){if(!(r.startRule in l))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=l[r.startRule]}function de(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function xe(e){var r,n=fe[e];if(n)return n;for(r=e-1;!fe[r];)r--;for(n={line:(n=fe[r]).line,column:n.column};rpe&&(pe=ce,he=[]),he.push(e))}function be(){var e,t,r,n,o=30*ce+0,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,(t=Ae())!==s&&(r=_e())!==s&&Ae()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ce=e,e=s),e===s&&(e=ce,(t=Ae())!==s&&(t=void 0),e=t),ye[o]={nextPos:ce,result:e},e)}function Ae(){var e,r,n=30*ce+1,o=ye[n];if(o)return ce=o.nextPos,o.result;for(e=[],32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));r!==s;)e.push(r),32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));return ye[n]={nextPos:ce,result:e},e}function Ee(){var e,r,n,o=30*ce+2,a=ye[o];if(a)return ce=a.nextPos,a.result;if(r=[],f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p));else r=s;return r!==s&&(r=r.join("")),e=r,ye[o]={nextPos:ce,result:e},e}function Se(){var e,r,n,o=30*ce+3,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,(r=Ae())!==s?(62===t.charCodeAt(ce)?(n=">",ce++):(n=s,ge(h)),n!==s&&Ae()!==s?e=r="child":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ae())!==s?(126===t.charCodeAt(ce)?(n="~",ce++):(n=s,ge(y)),n!==s&&Ae()!==s?e=r="sibling":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ae())!==s?(43===t.charCodeAt(ce)?(n="+",ce++):(n=s,ge(d)),n!==s&&Ae()!==s?e=r="adjacent":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c)),r!==s&&(n=Ae())!==s?e=r="descendant":(ce=e,e=s)))),ye[o]={nextPos:ce,result:e},e)}function _e(){var e,r,n,o,a,i,l,u,c=30*ce+4,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=we())!==s){for(n=[],o=ce,(a=Ae())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(l=Ae())!==s&&(u=we())!==s?o=a=[a,i,l,u]:(ce=o,o=s)):(ce=o,o=s);o!==s;)n.push(o),o=ce,(a=Ae())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(l=Ae())!==s&&(u=we())!==s?o=a=[a,i,l,u]:(ce=o,o=s)):(ce=o,o=s);n!==s?e=r=[r].concat(n.map((function(e){return e[3]}))):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}function we(){var e,t,r,n,o,a,i,l=30*ce+5,u=ye[l];if(u)return ce=u.nextPos,u.result;if(e=ce,(t=Ce())!==s){for(r=[],n=ce,(o=Se())!==s&&(a=Ce())!==s?n=o=[o,a]:(ce=n,n=s);n!==s;)r.push(n),n=ce,(o=Se())!==s&&(a=Ce())!==s?n=o=[o,a]:(ce=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}function Ce(){var e,r,n,o,a,i,l,u=30*ce+6,c=ye[u];if(c)return ce=c.nextPos,c.result;if(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(x)),r===s&&(r=null),r!==s){if(n=[],(o=Pe())!==s)for(;o!==s;)n.push(o),o=Pe();else n=s;n!==s?(a=r,l=1===(i=n).length?i[0]:{type:"compound",selectors:i},a&&(l.subject=!0),e=r=l):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}function Pe(){var e,r=30*ce+7,n=ye[r];return n?(ce=n.nextPos,n.result):((e=function(){var e,r,n=30*ce+8,o=ye[n];return o?(ce=o.nextPos,o.result):(42===t.charCodeAt(ce)?(r="*",ce++):(r=s,ge(v)),r!==s&&(r={type:"wildcard",value:r}),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o=30*ce+9,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,35===t.charCodeAt(ce)?(r="#",ce++):(r=s,ge(g)),r===s&&(r=null),r!==s&&(n=Ee())!==s?e=r={type:"identifier",value:n}:(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=30*ce+10,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,91===t.charCodeAt(ce)?(r="[",ce++):(r=s,ge(b)),r!==s&&Ae()!==s&&(n=function(){var e,r,n,o,a=30*ce+14,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,(r=ke())!==s&&Ae()!==s&&(n=function(){var e,r,n,o=30*ce+12,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(x)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(_)),n!==s?(r=w(r),e=r):(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())!==s&&Ae()!==s?((o=function(){var e,r,n,o,a,i=30*ce+18,l=ye[i];if(l)return ce=l.nextPos,l.result;if(e=ce,"type("===t.substr(ce,5)?(r="type(",ce+=5):(r=s,ge(N)),r!==s)if(Ae()!==s){if(n=[],W.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(K)),o!==s)for(;o!==s;)n.push(o),W.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(K));else n=s;n!==s&&(o=Ae())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(G)),a!==s?(r={type:"type",value:n.join("")},e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,l=30*ce+20,u=ye[l];if(u)return ce=u.nextPos,u.result;if(e=ce,47===t.charCodeAt(ce)?(r="/",ce++):(r=s,ge(Y)),r!==s){if(n=[],$.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(J)),o!==s)for(;o!==s;)n.push(o),$.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(J));else n=s;n!==s?(47===t.charCodeAt(ce)?(o="/",ce++):(o=s,ge(Y)),o!==s?((a=function(){var e,r,n=30*ce+19,o=ye[n];if(o)return ce=o.nextPos,o.result;if(e=[],z.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(H)),r!==s)for(;r!==s;)e.push(r),z.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(H));else e=s;return ye[n]={nextPos:ce,result:e},e}())===s&&(a=null),a!==s?(i=a,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ce=e,e=s)):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}()),o!==s?(r=D(r,n,o),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=ke())!==s&&Ae()!==s&&(n=function(){var e,r,n,o=30*ce+11,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,E.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(S)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(_)),n!==s?(r=w(r),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(C.test(t.charAt(ce))?(e=t.charAt(ce),ce++):(e=s,ge(P))),ye[o]={nextPos:ce,result:e},e)}())!==s&&Ae()!==s?((o=function(){var e,r,n,o,a,i,l=30*ce+15,u=ye[l];if(u)return ce=u.nextPos,u.result;if(e=ce,34===t.charCodeAt(ce)?(r='"',ce++):(r=s,ge(j)),r!==s){for(n=[],I.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(T)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(F)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(a=O(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));o!==s;)n.push(o),I.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(T)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(F)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(a=O(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));n!==s?(34===t.charCodeAt(ce)?(o='"',ce++):(o=s,ge(j)),o!==s?(r=R(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;if(e===s)if(e=ce,39===t.charCodeAt(ce)?(r="'",ce++):(r=s,ge(B)),r!==s){for(n=[],M.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(U)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(F)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(a=O(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));o!==s;)n.push(o),M.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(U)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(F)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(L)),i!==s?(a=O(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));n!==s?(39===t.charCodeAt(ce)?(o="'",ce++):(o=s,ge(B)),o!==s?(r=R(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,l,u=30*ce+16,c=ye[u];if(c)return ce=c.nextPos,c.result;for(e=ce,r=ce,n=[],q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V));o!==s;)n.push(o),q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V));if(n!==s?(46===t.charCodeAt(ce)?(o=".",ce++):(o=s,ge(k)),o!==s?r=n=[n,o]:(ce=r,r=s)):(ce=r,r=s),r===s&&(r=null),r!==s){if(n=[],q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V)),o!==s)for(;o!==s;)n.push(o),q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V));else n=s;n!==s?(i=n,l=(a=r)?[].concat.apply([],a).join(""):"",r={type:"literal",value:parseFloat(l+i.join(""))},e=r):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,t,r=30*ce+17,n=ye[r];return n?(ce=n.nextPos,n.result):((t=Ee())!==s&&(t={type:"literal",value:t}),e=t,ye[r]={nextPos:ce,result:e},e)}()),o!==s?(r=D(r,n,o),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=ke())!==s&&(r={type:"attribute",name:r}),e=r)),ye[a]={nextPos:ce,result:e},e)}())!==s&&Ae()!==s?(93===t.charCodeAt(ce)?(o="]",ce++):(o=s,ge(A)),o!==s?e=r=n:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i,l,u,c=30*ce+21,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,46===t.charCodeAt(ce)?(r=".",ce++):(r=s,ge(k)),r!==s)if((n=Ee())!==s){for(o=[],a=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(k)),i!==s&&(l=Ee())!==s?a=i=[i,l]:(ce=a,a=s);a!==s;)o.push(a),a=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(k)),i!==s&&(l=Ee())!==s?a=i=[i,l]:(ce=a,a=s);o!==s?(u=n,r={type:"field",name:o.reduce((function(e,t){return e+t[0]+t[1]}),u)},e=r):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o,a=30*ce+22,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":not("===t.substr(ce,5)?(r=":not(",ce+=5):(r=s,ge(Q)),r!==s&&Ae()!==s&&(n=_e())!==s&&Ae()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(G)),o!==s?e=r={type:"not",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=30*ce+23,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":matches("===t.substr(ce,9)?(r=":matches(",ce+=9):(r=s,ge(X)),r!==s&&Ae()!==s&&(n=_e())!==s&&Ae()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(G)),o!==s?e=r={type:"matches",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=30*ce+24,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":has("===t.substr(ce,5)?(r=":has(",ce+=5):(r=s,ge(Z)),r!==s&&Ae()!==s&&(n=_e())!==s&&Ae()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(G)),o!==s?e=r={type:"has",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=30*ce+25,o=ye[n];return o?(ce=o.nextPos,o.result):(":first-child"===t.substr(ce,12)?(r=":first-child",ce+=12):(r=s,ge(ee)),r!==s&&(r=De(1)),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=30*ce+26,o=ye[n];return o?(ce=o.nextPos,o.result):(":last-child"===t.substr(ce,11)?(r=":last-child",ce+=11):(r=s,ge(te)),r!==s&&(r=je(1)),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i=30*ce+27,l=ye[i];if(l)return ce=l.nextPos,l.result;if(e=ce,":nth-child("===t.substr(ce,11)?(r=":nth-child(",ce+=11):(r=s,ge(re)),r!==s)if(Ae()!==s){if(n=[],q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V)),o!==s)for(;o!==s;)n.push(o),q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V));else n=s;n!==s&&(o=Ae())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(G)),a!==s?(r=De(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o,a,i=30*ce+28,l=ye[i];if(l)return ce=l.nextPos,l.result;if(e=ce,":nth-last-child("===t.substr(ce,16)?(r=":nth-last-child(",ce+=16):(r=s,ge(ne)),r!==s)if(Ae()!==s){if(n=[],q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V)),o!==s)for(;o!==s;)n.push(o),q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(V));else n=s;n!==s&&(o=Ae())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(G)),a!==s?(r=je(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o=30*ce+29,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,58===t.charCodeAt(ce)?(r=":",ce++):(r=s,ge(oe)),r!==s?("statement"===t.substr(ce,9).toLowerCase()?(n=t.substr(ce,9),ce+=9):(n=s,ge(ae)),n===s&&("expression"===t.substr(ce,10).toLowerCase()?(n=t.substr(ce,10),ce+=10):(n=s,ge(ie)),n===s&&("declaration"===t.substr(ce,11).toLowerCase()?(n=t.substr(ce,11),ce+=11):(n=s,ge(se)),n===s&&("function"===t.substr(ce,8).toLowerCase()?(n=t.substr(ce,8),ce+=8):(n=s,ge(le)),n===s&&("pattern"===t.substr(ce,7).toLowerCase()?(n=t.substr(ce,7),ce+=7):(n=s,ge(ue)))))),n!==s?e=r={type:"class",name:n}:(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}()),ye[r]={nextPos:ce,result:e},e)}function ke(){var e,r,n,o,a,i,l,u,c=30*ce+13,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=Ee())!==s){for(n=[],o=ce,46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(k)),a!==s&&(i=Ee())!==s?o=a=[a,i]:(ce=o,o=s);o!==s;)n.push(o),o=ce,46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(k)),a!==s&&(i=Ee())!==s?o=a=[a,i]:(ce=o,o=s);n!==s?(l=r,u=n,e=r=[].concat.apply([l],u).join("")):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}function De(e){return{type:"nth-child",index:{type:"literal",value:e}}}function je(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=u())!==s&&ce===t.length)return n;throw n!==s&&ce":return w>r.value.value;case">=":return w>=r.value.value}throw new Error("Unknown operator: ".concat(r.operator));case"sibling":return u(t,r.right,n,o)&&p(t,r.left,n,"LEFT_SIDE",o)||r.left.subject&&u(t,r.left,n,o)&&p(t,r.right,n,"RIGHT_SIDE",o);case"adjacent":return u(t,r.right,n,o)&&h(t,r.left,n,"LEFT_SIDE",o)||r.right.subject&&u(t,r.left,n,o)&&h(t,r.right,n,"RIGHT_SIDE",o);case"nth-child":return u(t,r.right,n,o)&&y(t,n,(function(){return r.index.value-1}),o);case"nth-last-child":return u(t,r.right,n,o)&&y(t,n,(function(e){return e-r.index.value}),o);case"class":switch(r.name.toLowerCase()){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===n.length||"MetaProperty"!==n[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(r.name))}throw new Error("Unknown selector type: ".concat(r.type))}function c(e,t){var r=e.type;return t&&t.visitorKeys&&t.visitorKeys[r]?t.visitorKeys[r]:s.VisitorKeys[r]?s.VisitorKeys[r]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return"type"!==e}))}function f(t){return null!==t&&"object"===e(t)&&"string"==typeof t.type}function p(e,r,n,o,i){var s=t(n,1)[0];if(!s)return!1;var l,p=a(c(s,i));try{for(p.s();!(l=p.n()).done;){var h=s[l.value];if(Array.isArray(h)){var y=h.indexOf(e);if(y<0)continue;var d=void 0,m=void 0;"LEFT_SIDE"===o?(d=0,m=y):(d=y+1,m=h.length);for(var x=d;x0&&f(h[y-1])&&u(h[y-1],r,n,i))return!0;if("RIGHT_SIDE"===o&&y=0&&f===n(u.length))return!0}}}catch(e){l.e(e)}finally{l.f()}return!1}function d(n,o){if(null==n||"object"!=e(n))return[];null==o&&(o=n);for(var a=n.subject?[o]:[],i=0,s=function(e){for(var t=[],r=Object.keys(e),n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,o,a;for(n=e.length,o=0;n;)t(e[a=o+(r=n>>>1)])?n=r:(o=a+1,n-=r+1);return o}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:a={},Skip:i={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,o;function a(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(u,x[d]))o=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;o=new c(v[m],[f,m],null,null)}r.push(o)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(o=n.pop(),l=this.__execute(t.leave,o),this.__state===a||l===a)return},f.prototype.replace=function(e,t){var r,n,o,u,f,y,d,m,x,v,g,A,E;function b(e){var t,n,o,a;if(e.ref.remove())for(n=e.ref.key,a=e.ref.parent,t=r.length;t--;)if((o=r[t]).ref&&o.ref.parent===a){if(o.ref.key=0;)if(v=o[E=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(u,x[d]))y=new c(v[m],[E,m],"Property",new l(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[E,m],null,new l(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,E,null,new l(o,E)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==a&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||b(y),this.__state===a||f===a)return A.root;return A.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var o,a,i,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,a=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?n.Break:l[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=o,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),s=a((function(e){e.exports&&(e.exports=function(){function e(t,r,n,o){this.message=t,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=fe([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=ce(">",!1),y=ce("~",!1),d=ce("+",!1),m=ce(",",!1),x=ce("!",!1),v=ce("*",!1),g=ce("#",!1),A=ce("[",!1),E=ce("]",!1),b=/^[>","<","!"],!1,!1),_=ce("=",!1),C=function(e){return(e||"")+"="},w=/^[><]/,P=fe([">","<"],!1,!1),k=ce(".",!1),D=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},I=ce('"',!1),j=/^[^\\"]/,T=fe(["\\",'"'],!0,!1),F=ce("\\",!1),R={type:"any"},O=function(e,t){return e+t},L=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},M=ce("'",!1),B=/^[^\\']/,U=fe(["\\","'"],!0,!1),K=/^[0-9]/,W=fe([["0","9"]],!1,!1),q=ce("type(",!1),V=/^[^ )]/,N=fe([" ",")"],!0,!1),G=ce(")",!1),z=/^[imsu]/,H=fe(["i","m","s","u"],!1,!1),Y=ce("/",!1),$=/^[^\/]/,J=fe(["/"],!0,!1),Q=ce(":not(",!1),X=ce(":matches(",!1),Z=ce(":has(",!1),ee=ce(":first-child",!1),te=ce(":last-child",!1),re=ce(":nth-child(",!1),ne=ce(":nth-last-child(",!1),oe=ce(":",!1),ae=0,ie=[{line:1,column:1}],se=0,ue=[],le={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function ce(e,t){return{type:"literal",text:e,ignoreCase:t}}function fe(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function pe(e){var r,n=ie[e];if(n)return n;for(r=e-1;!ie[r];)r--;for(n={line:(n=ie[r]).line,column:n.column};rse&&(se=ae,ue=[]),ue.push(e))}function de(){var e,t,r,n,o=30*ae+0,a=le[o];return a?(ae=a.nextPos,a.result):(e=ae,(t=me())!==s&&(r=ge())!==s&&me()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ae=e,e=s),e===s&&(e=ae,(t=me())!==s&&(t=void 0),e=t),le[o]={nextPos:ae,result:e},e)}function me(){var e,r,n=30*ae+1,o=le[n];if(o)return ae=o.nextPos,o.result;for(e=[],32===t.charCodeAt(ae)?(r=" ",ae++):(r=s,ye(c));r!==s;)e.push(r),32===t.charCodeAt(ae)?(r=" ",ae++):(r=s,ye(c));return le[n]={nextPos:ae,result:e},e}function xe(){var e,r,n,o=30*ae+2,a=le[o];if(a)return ae=a.nextPos,a.result;if(r=[],f.test(t.charAt(ae))?(n=t.charAt(ae),ae++):(n=s,ye(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ae))?(n=t.charAt(ae),ae++):(n=s,ye(p));else r=s;return r!==s&&(r=r.join("")),e=r,le[o]={nextPos:ae,result:e},e}function ve(){var e,r,n,o=30*ae+3,a=le[o];return a?(ae=a.nextPos,a.result):(e=ae,(r=me())!==s?(62===t.charCodeAt(ae)?(n=">",ae++):(n=s,ye(h)),n!==s&&me()!==s?e=r="child":(ae=e,e=s)):(ae=e,e=s),e===s&&(e=ae,(r=me())!==s?(126===t.charCodeAt(ae)?(n="~",ae++):(n=s,ye(y)),n!==s&&me()!==s?e=r="sibling":(ae=e,e=s)):(ae=e,e=s),e===s&&(e=ae,(r=me())!==s?(43===t.charCodeAt(ae)?(n="+",ae++):(n=s,ye(d)),n!==s&&me()!==s?e=r="adjacent":(ae=e,e=s)):(ae=e,e=s),e===s&&(e=ae,32===t.charCodeAt(ae)?(r=" ",ae++):(r=s,ye(c)),r!==s&&(n=me())!==s?e=r="descendant":(ae=e,e=s)))),le[o]={nextPos:ae,result:e},e)}function ge(){var e,r,n,o,a,i,u,l,c=30*ae+4,f=le[c];if(f)return ae=f.nextPos,f.result;if(e=ae,(r=Ae())!==s){for(n=[],o=ae,(a=me())!==s?(44===t.charCodeAt(ae)?(i=",",ae++):(i=s,ye(m)),i!==s&&(u=me())!==s&&(l=Ae())!==s?o=a=[a,i,u,l]:(ae=o,o=s)):(ae=o,o=s);o!==s;)n.push(o),o=ae,(a=me())!==s?(44===t.charCodeAt(ae)?(i=",",ae++):(i=s,ye(m)),i!==s&&(u=me())!==s&&(l=Ae())!==s?o=a=[a,i,u,l]:(ae=o,o=s)):(ae=o,o=s);n!==s?e=r=[r].concat(n.map((function(e){return e[3]}))):(ae=e,e=s)}else ae=e,e=s;return le[c]={nextPos:ae,result:e},e}function Ae(){var e,t,r,n,o,a,i,u=30*ae+5,l=le[u];if(l)return ae=l.nextPos,l.result;if(e=ae,(t=Ee())!==s){for(r=[],n=ae,(o=ve())!==s&&(a=Ee())!==s?n=o=[o,a]:(ae=n,n=s);n!==s;)r.push(n),n=ae,(o=ve())!==s&&(a=Ee())!==s?n=o=[o,a]:(ae=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ae=e,e=s)}else ae=e,e=s;return le[u]={nextPos:ae,result:e},e}function Ee(){var e,r,n,o,a,i,u,l=30*ae+6,c=le[l];if(c)return ae=c.nextPos,c.result;if(e=ae,33===t.charCodeAt(ae)?(r="!",ae++):(r=s,ye(x)),r===s&&(r=null),r!==s){if(n=[],(o=be())!==s)for(;o!==s;)n.push(o),o=be();else n=s;n!==s?(a=r,u=1===(i=n).length?i[0]:{type:"compound",selectors:i},a&&(u.subject=!0),e=r=u):(ae=e,e=s)}else ae=e,e=s;return le[l]={nextPos:ae,result:e},e}function be(){var e,r=30*ae+7,n=le[r];return n?(ae=n.nextPos,n.result):((e=function(){var e,r,n=30*ae+8,o=le[n];return o?(ae=o.nextPos,o.result):(42===t.charCodeAt(ae)?(r="*",ae++):(r=s,ye(v)),r!==s&&(r={type:"wildcard",value:r}),e=r,le[n]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n,o=30*ae+9,a=le[o];return a?(ae=a.nextPos,a.result):(e=ae,35===t.charCodeAt(ae)?(r="#",ae++):(r=s,ye(g)),r===s&&(r=null),r!==s&&(n=xe())!==s?e=r={type:"identifier",value:n}:(ae=e,e=s),le[o]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=30*ae+10,i=le[a];return i?(ae=i.nextPos,i.result):(e=ae,91===t.charCodeAt(ae)?(r="[",ae++):(r=s,ye(A)),r!==s&&me()!==s&&(n=function(){var e,r,n,o,a=30*ae+14,i=le[a];return i?(ae=i.nextPos,i.result):(e=ae,(r=Se())!==s&&me()!==s&&(n=function(){var e,r,n,o=30*ae+12,a=le[o];return a?(ae=a.nextPos,a.result):(e=ae,33===t.charCodeAt(ae)?(r="!",ae++):(r=s,ye(x)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ae)?(n="=",ae++):(n=s,ye(_)),n!==s?(r=C(r),e=r):(ae=e,e=s)):(ae=e,e=s),le[o]={nextPos:ae,result:e},e)}())!==s&&me()!==s?((o=function(){var e,r,n,o,a,i=30*ae+18,u=le[i];if(u)return ae=u.nextPos,u.result;if(e=ae,"type("===t.substr(ae,5)?(r="type(",ae+=5):(r=s,ye(q)),r!==s)if(me()!==s){if(n=[],V.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(N)),o!==s)for(;o!==s;)n.push(o),V.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(N));else n=s;n!==s&&(o=me())!==s?(41===t.charCodeAt(ae)?(a=")",ae++):(a=s,ye(G)),a!==s?(r={type:"type",value:n.join("")},e=r):(ae=e,e=s)):(ae=e,e=s)}else ae=e,e=s;else ae=e,e=s;return le[i]={nextPos:ae,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u=30*ae+20,l=le[u];if(l)return ae=l.nextPos,l.result;if(e=ae,47===t.charCodeAt(ae)?(r="/",ae++):(r=s,ye(Y)),r!==s){if(n=[],$.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(J)),o!==s)for(;o!==s;)n.push(o),$.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(J));else n=s;n!==s?(47===t.charCodeAt(ae)?(o="/",ae++):(o=s,ye(Y)),o!==s?((a=function(){var e,r,n=30*ae+19,o=le[n];if(o)return ae=o.nextPos,o.result;if(e=[],z.test(t.charAt(ae))?(r=t.charAt(ae),ae++):(r=s,ye(H)),r!==s)for(;r!==s;)e.push(r),z.test(t.charAt(ae))?(r=t.charAt(ae),ae++):(r=s,ye(H));else e=s;return le[n]={nextPos:ae,result:e},e}())===s&&(a=null),a!==s?(i=a,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ae=e,e=s)):(ae=e,e=s)):(ae=e,e=s)}else ae=e,e=s;return le[u]={nextPos:ae,result:e},e}()),o!==s?(r=D(r,n,o),e=r):(ae=e,e=s)):(ae=e,e=s),e===s&&(e=ae,(r=Se())!==s&&me()!==s&&(n=function(){var e,r,n,o=30*ae+11,a=le[o];return a?(ae=a.nextPos,a.result):(e=ae,b.test(t.charAt(ae))?(r=t.charAt(ae),ae++):(r=s,ye(S)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ae)?(n="=",ae++):(n=s,ye(_)),n!==s?(r=C(r),e=r):(ae=e,e=s)):(ae=e,e=s),e===s&&(w.test(t.charAt(ae))?(e=t.charAt(ae),ae++):(e=s,ye(P))),le[o]={nextPos:ae,result:e},e)}())!==s&&me()!==s?((o=function(){var e,r,n,o,a,i,u=30*ae+15,l=le[u];if(l)return ae=l.nextPos,l.result;if(e=ae,34===t.charCodeAt(ae)?(r='"',ae++):(r=s,ye(I)),r!==s){for(n=[],j.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(T)),o===s&&(o=ae,92===t.charCodeAt(ae)?(a="\\",ae++):(a=s,ye(F)),a!==s?(t.length>ae?(i=t.charAt(ae),ae++):(i=s,ye(R)),i!==s?(a=O(a,i),o=a):(ae=o,o=s)):(ae=o,o=s));o!==s;)n.push(o),j.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(T)),o===s&&(o=ae,92===t.charCodeAt(ae)?(a="\\",ae++):(a=s,ye(F)),a!==s?(t.length>ae?(i=t.charAt(ae),ae++):(i=s,ye(R)),i!==s?(a=O(a,i),o=a):(ae=o,o=s)):(ae=o,o=s));n!==s?(34===t.charCodeAt(ae)?(o='"',ae++):(o=s,ye(I)),o!==s?(r=L(n),e=r):(ae=e,e=s)):(ae=e,e=s)}else ae=e,e=s;if(e===s)if(e=ae,39===t.charCodeAt(ae)?(r="'",ae++):(r=s,ye(M)),r!==s){for(n=[],B.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(U)),o===s&&(o=ae,92===t.charCodeAt(ae)?(a="\\",ae++):(a=s,ye(F)),a!==s?(t.length>ae?(i=t.charAt(ae),ae++):(i=s,ye(R)),i!==s?(a=O(a,i),o=a):(ae=o,o=s)):(ae=o,o=s));o!==s;)n.push(o),B.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(U)),o===s&&(o=ae,92===t.charCodeAt(ae)?(a="\\",ae++):(a=s,ye(F)),a!==s?(t.length>ae?(i=t.charAt(ae),ae++):(i=s,ye(R)),i!==s?(a=O(a,i),o=a):(ae=o,o=s)):(ae=o,o=s));n!==s?(39===t.charCodeAt(ae)?(o="'",ae++):(o=s,ye(M)),o!==s?(r=L(n),e=r):(ae=e,e=s)):(ae=e,e=s)}else ae=e,e=s;return le[u]={nextPos:ae,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u,l=30*ae+16,c=le[l];if(c)return ae=c.nextPos,c.result;for(e=ae,r=ae,n=[],K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W));o!==s;)n.push(o),K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W));if(n!==s?(46===t.charCodeAt(ae)?(o=".",ae++):(o=s,ye(k)),o!==s?r=n=[n,o]:(ae=r,r=s)):(ae=r,r=s),r===s&&(r=null),r!==s){if(n=[],K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W)),o!==s)for(;o!==s;)n.push(o),K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W));else n=s;n!==s?(i=n,u=(a=r)?[].concat.apply([],a).join(""):"",r={type:"literal",value:parseFloat(u+i.join(""))},e=r):(ae=e,e=s)}else ae=e,e=s;return le[l]={nextPos:ae,result:e},e}())===s&&(o=function(){var e,t,r=30*ae+17,n=le[r];return n?(ae=n.nextPos,n.result):((t=xe())!==s&&(t={type:"literal",value:t}),e=t,le[r]={nextPos:ae,result:e},e)}()),o!==s?(r=D(r,n,o),e=r):(ae=e,e=s)):(ae=e,e=s),e===s&&(e=ae,(r=Se())!==s&&(r={type:"attribute",name:r}),e=r)),le[a]={nextPos:ae,result:e},e)}())!==s&&me()!==s?(93===t.charCodeAt(ae)?(o="]",ae++):(o=s,ye(E)),o!==s?e=r=n:(ae=e,e=s)):(ae=e,e=s),le[a]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i,u,l,c=30*ae+21,f=le[c];if(f)return ae=f.nextPos,f.result;if(e=ae,46===t.charCodeAt(ae)?(r=".",ae++):(r=s,ye(k)),r!==s)if((n=xe())!==s){for(o=[],a=ae,46===t.charCodeAt(ae)?(i=".",ae++):(i=s,ye(k)),i!==s&&(u=xe())!==s?a=i=[i,u]:(ae=a,a=s);a!==s;)o.push(a),a=ae,46===t.charCodeAt(ae)?(i=".",ae++):(i=s,ye(k)),i!==s&&(u=xe())!==s?a=i=[i,u]:(ae=a,a=s);o!==s?(l=n,r={type:"field",name:o.reduce((function(e,t){return e+t[0]+t[1]}),l)},e=r):(ae=e,e=s)}else ae=e,e=s;else ae=e,e=s;return le[c]={nextPos:ae,result:e},e}())===s&&(e=function(){var e,r,n,o,a=30*ae+22,i=le[a];return i?(ae=i.nextPos,i.result):(e=ae,":not("===t.substr(ae,5)?(r=":not(",ae+=5):(r=s,ye(Q)),r!==s&&me()!==s&&(n=ge())!==s&&me()!==s?(41===t.charCodeAt(ae)?(o=")",ae++):(o=s,ye(G)),o!==s?e=r={type:"not",selectors:n}:(ae=e,e=s)):(ae=e,e=s),le[a]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=30*ae+23,i=le[a];return i?(ae=i.nextPos,i.result):(e=ae,":matches("===t.substr(ae,9)?(r=":matches(",ae+=9):(r=s,ye(X)),r!==s&&me()!==s&&(n=ge())!==s&&me()!==s?(41===t.charCodeAt(ae)?(o=")",ae++):(o=s,ye(G)),o!==s?e=r={type:"matches",selectors:n}:(ae=e,e=s)):(ae=e,e=s),le[a]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=30*ae+24,i=le[a];return i?(ae=i.nextPos,i.result):(e=ae,":has("===t.substr(ae,5)?(r=":has(",ae+=5):(r=s,ye(Z)),r!==s&&me()!==s&&(n=ge())!==s&&me()!==s?(41===t.charCodeAt(ae)?(o=")",ae++):(o=s,ye(G)),o!==s?e=r={type:"has",selectors:n}:(ae=e,e=s)):(ae=e,e=s),le[a]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n=30*ae+25,o=le[n];return o?(ae=o.nextPos,o.result):(":first-child"===t.substr(ae,12)?(r=":first-child",ae+=12):(r=s,ye(ee)),r!==s&&(r=_e(1)),e=r,le[n]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n=30*ae+26,o=le[n];return o?(ae=o.nextPos,o.result):(":last-child"===t.substr(ae,11)?(r=":last-child",ae+=11):(r=s,ye(te)),r!==s&&(r=Ce(1)),e=r,le[n]={nextPos:ae,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i=30*ae+27,u=le[i];if(u)return ae=u.nextPos,u.result;if(e=ae,":nth-child("===t.substr(ae,11)?(r=":nth-child(",ae+=11):(r=s,ye(re)),r!==s)if(me()!==s){if(n=[],K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W)),o!==s)for(;o!==s;)n.push(o),K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W));else n=s;n!==s&&(o=me())!==s?(41===t.charCodeAt(ae)?(a=")",ae++):(a=s,ye(G)),a!==s?(r=_e(parseInt(n.join(""),10)),e=r):(ae=e,e=s)):(ae=e,e=s)}else ae=e,e=s;else ae=e,e=s;return le[i]={nextPos:ae,result:e},e}())===s&&(e=function(){var e,r,n,o,a,i=30*ae+28,u=le[i];if(u)return ae=u.nextPos,u.result;if(e=ae,":nth-last-child("===t.substr(ae,16)?(r=":nth-last-child(",ae+=16):(r=s,ye(ne)),r!==s)if(me()!==s){if(n=[],K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W)),o!==s)for(;o!==s;)n.push(o),K.test(t.charAt(ae))?(o=t.charAt(ae),ae++):(o=s,ye(W));else n=s;n!==s&&(o=me())!==s?(41===t.charCodeAt(ae)?(a=")",ae++):(a=s,ye(G)),a!==s?(r=Ce(parseInt(n.join(""),10)),e=r):(ae=e,e=s)):(ae=e,e=s)}else ae=e,e=s;else ae=e,e=s;return le[i]={nextPos:ae,result:e},e}())===s&&(e=function(){var e,r,n,o=30*ae+29,a=le[o];return a?(ae=a.nextPos,a.result):(e=ae,58===t.charCodeAt(ae)?(r=":",ae++):(r=s,ye(oe)),r!==s&&(n=xe())!==s?e=r={type:"class",name:n}:(ae=e,e=s),le[o]={nextPos:ae,result:e},e)}()),le[r]={nextPos:ae,result:e},e)}function Se(){var e,r,n,o,a,i,u,l,c=30*ae+13,f=le[c];if(f)return ae=f.nextPos,f.result;if(e=ae,(r=xe())!==s){for(n=[],o=ae,46===t.charCodeAt(ae)?(a=".",ae++):(a=s,ye(k)),a!==s&&(i=xe())!==s?o=a=[a,i]:(ae=o,o=s);o!==s;)n.push(o),o=ae,46===t.charCodeAt(ae)?(a=".",ae++):(a=s,ye(k)),a!==s&&(i=xe())!==s?o=a=[a,i]:(ae=o,o=s);n!==s?(u=r,l=n,e=r=[].concat.apply([u],l).join("")):(ae=e,e=s)}else ae=e,e=s;return le[c]={nextPos:ae,result:e},e}function _e(e){return{type:"nth-child",index:{type:"literal",value:e}}}function Ce(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=l())!==s&&ae===t.length)return n;throw n!==s&&ae0&&p(e,t,r))&&f(t[0],t.slice(1),r)};case"descendant":var h=c(t.left),x=c(t.right);return function(e,t,r){if(x(e,t,r))for(var n=0,o=t.length;n":return function(e){return u(e,v)>t.value.value};case">=":return function(e){return u(e,v)>=t.value.value}}throw new Error("Unknown operator: ".concat(t.operator));case"sibling":var E=c(t.left),b=c(t.right);return function(e,r,n){return b(e,r,n)&&y(e,E,r,"LEFT_SIDE",n)||t.left.subject&&E(e,r,n)&&y(e,b,r,"RIGHT_SIDE",n)};case"adjacent":var S=c(t.left),_=c(t.right);return function(e,r,n){return _(e,r,n)&&d(e,S,r,"LEFT_SIDE",n)||t.right.subject&&S(e,r,n)&&d(e,_,r,"RIGHT_SIDE",n)};case"nth-child":var C=t.index.value,w=c(t.right);return function(e,t,r){return w(e,t,r)&&m(e,t,C,r)};case"nth-last-child":var P=-t.index.value,k=c(t.right);return function(e,t,r){return k(e,t,r)&&m(e,t,P,r)};case"class":return function(e,r,n){if(n&&n.matchClass)return n.matchClass(t.name,e,r);if(n&&n.nodeTypeKey)return!1;switch(t.name.toLowerCase()){case"statement":if("Statement"===e.type.slice(-9))return!0;case"declaration":return"Declaration"===e.type.slice(-11);case"pattern":if("Pattern"===e.type.slice(-7))return!0;case"expression":return"Expression"===e.type.slice(-10)||"Literal"===e.type.slice(-7)||"Identifier"===e.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===e.type;case"function":return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}throw new Error("Unknown class name: ".concat(t.name))}}throw new Error("Unknown selector type: ".concat(t.type))}function p(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:i.VisitorKeys[n]?i.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return e!==r}))}function h(t,r){var n=r&&r.nodeTypeKey||"type";return null!==t&&"object"===e(t)&&"string"==typeof t[n]}function y(e,r,n,o,a){var i=t(n,1)[0];if(!i)return!1;for(var s=p(i,a),u=0;u0&&h(l[c-1],a)&&r(l[c-1],n,a))return!0;if("RIGHT_SIDE"===o&&c=0&&l\n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n Program: 'Program',\n Property: 'Property',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n Program: ['body'],\n Property: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[>\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = \"statement\",\n peg$c103 = peg$literalExpectation(\"statement\", true),\n peg$c104 = \"expression\",\n peg$c105 = peg$literalExpectation(\"expression\", true),\n peg$c106 = \"declaration\",\n peg$c107 = peg$literalExpectation(\"declaration\", true),\n peg$c108 = \"function\",\n peg$c109 = peg$literalExpectation(\"function\", true),\n peg$c110 = \"pattern\",\n peg$c111 = peg$literalExpectation(\"pattern\", true),\n peg$c112 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) {\n s2 = input.substr(peg$currPos, 9);\n peg$currPos += 9;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c103); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) {\n s2 = input.substr(peg$currPos, 10);\n peg$currPos += 10;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c105); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) {\n s2 = input.substr(peg$currPos, 11);\n peg$currPos += 11;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c107); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) {\n s2 = input.substr(peg$currPos, 8);\n peg$currPos += 8;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c109); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) {\n s2 = input.substr(peg$currPos, 7);\n peg$currPos += 7;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c111); }\n }\n }\n }\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c112(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string} key\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, key) {\n const keys = key.split('.');\n for (const key of keys) {\n if (obj == null) { return obj; }\n obj = obj[key];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path) {\n if (path.length === 0) { return node === ancestor; }\n if (ancestor == null) { return false; }\n const field = ancestor[path[0]];\n const remainingPath = path.slice(1);\n if (Array.isArray(field)) {\n for (const component of field) {\n if (inPath(node, component, remainingPath)) { return true; }\n }\n return false;\n } else {\n return inPath(node, field, remainingPath);\n }\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n/**\n * @typedef {object} ESQueryOptions\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n switch(selector.type) {\n case 'wildcard':\n return true;\n\n case 'identifier':\n return selector.value.toLowerCase() === node.type.toLowerCase();\n\n case 'field': {\n const path = selector.name.split('.');\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path);\n\n }\n case 'matches':\n for (const sel of selector.selectors) {\n if (matches(node, sel, ancestry, options)) { return true; }\n }\n return false;\n\n case 'compound':\n for (const sel of selector.selectors) {\n if (!matches(node, sel, ancestry, options)) { return false; }\n }\n return true;\n\n case 'not':\n for (const sel of selector.selectors) {\n if (matches(node, sel, ancestry, options)) { return false; }\n }\n return true;\n\n case 'has': {\n const collector = [];\n for (const sel of selector.selectors) {\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n if (matches(node, sel, a, options)) {\n collector.push(node);\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n }\n return collector.length !== 0;\n\n }\n case 'child':\n if (matches(node, selector.right, ancestry, options)) {\n return matches(ancestry[0], selector.left, ancestry.slice(1), options);\n }\n return false;\n\n case 'descendant':\n if (matches(node, selector.right, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (matches(ancestry[i], selector.left, ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n\n case 'attribute': {\n const p = getPath(node, selector.name);\n switch (selector.operator) {\n case void 0:\n return p != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp': return typeof p === 'string' && selector.value.value.test(p);\n case 'literal': return `${selector.value.value}` === `${p}`;\n case 'type': return selector.value.value === typeof p;\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp': return !selector.value.value.test(p);\n case 'literal': return `${selector.value.value}` !== `${p}`;\n case 'type': return selector.value.value !== typeof p;\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=': return p <= selector.value.value;\n case '<': return p < selector.value.value;\n case '>': return p > selector.value.value;\n case '>=': return p >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n case 'sibling':\n return matches(node, selector.right, ancestry, options) &&\n sibling(node, selector.left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n matches(node, selector.left, ancestry, options) &&\n sibling(node, selector.right, ancestry, RIGHT_SIDE, options);\n case 'adjacent':\n return matches(node, selector.right, ancestry, options) &&\n adjacent(node, selector.left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n matches(node, selector.left, ancestry, options) &&\n adjacent(node, selector.right, ancestry, RIGHT_SIDE, options);\n\n case 'nth-child':\n return matches(node, selector.right, ancestry, options) &&\n nthChild(node, ancestry, function () {\n return selector.index.value - 1;\n }, options);\n\n case 'nth-last-child':\n return matches(node, selector.right, ancestry, options) &&\n nthChild(node, ancestry, function (length) {\n return length - selector.index.value;\n }, options);\n\n case 'class':\n switch(selector.name.toLowerCase()){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeType = node.type;\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== 'type';\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node) {\n return node !== null && typeof node === 'object' && typeof node.type === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector.\n * @param {external:AST} node\n * @param {SelectorSequenceAST} selector\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, selector, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k]) && matches(listProp[k], selector, ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector.\n * @param {external:AST} node\n * @param {SelectorSequenceAST} selector\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, selector, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1]) && matches(listProp[idx - 1], selector, ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1]) && matches(listProp[idx + 1], selector, ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n* @callback IndexFunction\n* @param {Integer} len Containing list's length\n* @returns {Integer}\n*/\n\n/**\n * Determines if the given node is the nth child, determined by\n * `idxFn`, which is given the containing list's length.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {IndexFunction} idxFn\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, idxFn, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (const key of keys) {\n const listProp = parent[key];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx >= 0 && idx === idxFn(listProp.length)) { return true; }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n for (const [p, sel] of Object.entries(selector)) {\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const altSubjects = subjects(selector);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matches(node, selector, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (matches(node, altSubjects[i], ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (matches(ancestry[k], altSubjects[i], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","Program","Property","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","this","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$c103","peg$c105","peg$c107","peg$c109","peg$c111","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","ss","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","toLowerCase","peg$parseclass","n","index","factory","matches","selector","ancestry","split","ancestor","inPath","field","remainingPath","sel","collector","estraverse","unshift","shift","visitorKeys","l","getPath","sibling","adjacent","nthChild","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","k","idx","idxFn","subjects","results","_objectEntries","ast","altSubjects","m","succeedingAncestry","parser","query"],"mappings":"kiFA2BUA,EAAMC,OAGRC,EACAC,EACAC,EACAC,EACAC,EACAC,WAEKC,EAASC,OACAC,EAAKC,EAAfC,EAAM,OACLF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,UAIhBC,WA4LFE,EAAUC,EAAQL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EAASU,SACpBzO,KAAMgE,GAAWA,EAAQ0K,YACzB5O,SAAUkE,GAAWA,EAAQlE,UAAY,eAajD,SAAS4G,EAAMoJ,EAAKhC,EAAU9J,OACpB4L,EAAU,UAChBrX,EAASuX,EAAKhC,GAAU,SAAUvW,GAC9BqY,EAAQ/Q,KAAKtH,KACdyM,GACI4L,EAQX,SAAS9L,EAAMgK,UACJoC,EAAOpM,MAAMgK,GAUxB,SAASqC,EAAML,EAAKhC,EAAU9J,UACnB0C,EAAMoJ,EAAKhM,EAAMgK,GAAW9J,UAGvCmM,EAAMrM,MAAQA,EACdqM,EAAMzJ,MAAQA,EACdyJ,EAAM5X,SAAWA,EACjB4X,EAAMtC,QAAUA,EAChBsC,EAAMA,MAAQA"} \ No newline at end of file +{"version":3,"file":"esquery.min.js","sources":["../node_modules/estraverse/estraverse.js","../parser.js","../esquery.js"],"sourcesContent":["/*\n Copyright (C) 2012-2013 Yusuke Suzuki \n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c21 = \"!\",\n peg$c22 = peg$literalExpectation(\"!\", false),\n peg$c23 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c24 = \"*\",\n peg$c25 = peg$literalExpectation(\"*\", false),\n peg$c26 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c27 = \"#\",\n peg$c28 = peg$literalExpectation(\"#\", false),\n peg$c29 = function(i) { return { type: 'identifier', value: i }; },\n peg$c30 = \"[\",\n peg$c31 = peg$literalExpectation(\"[\", false),\n peg$c32 = \"]\",\n peg$c33 = peg$literalExpectation(\"]\", false),\n peg$c34 = function(v) { return v; },\n peg$c35 = /^[>\", \"<\", \"!\"], false, false),\n peg$c37 = \"=\",\n peg$c38 = peg$literalExpectation(\"=\", false),\n peg$c39 = function(a) { return (a || '') + '='; },\n peg$c40 = /^[><]/,\n peg$c41 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c42 = \".\",\n peg$c43 = peg$literalExpectation(\".\", false),\n peg$c44 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c45 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c46 = function(name) { return { type: 'attribute', name: name }; },\n peg$c47 = \"\\\"\",\n peg$c48 = peg$literalExpectation(\"\\\"\", false),\n peg$c49 = /^[^\\\\\"]/,\n peg$c50 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c51 = \"\\\\\",\n peg$c52 = peg$literalExpectation(\"\\\\\", false),\n peg$c53 = peg$anyExpectation(),\n peg$c54 = function(a, b) { return a + b; },\n peg$c55 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c56 = \"'\",\n peg$c57 = peg$literalExpectation(\"'\", false),\n peg$c58 = /^[^\\\\']/,\n peg$c59 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c60 = /^[0-9]/,\n peg$c61 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c62 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c63 = function(i) { return { type: 'literal', value: i }; },\n peg$c64 = \"type(\",\n peg$c65 = peg$literalExpectation(\"type(\", false),\n peg$c66 = /^[^ )]/,\n peg$c67 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c68 = \")\",\n peg$c69 = peg$literalExpectation(\")\", false),\n peg$c70 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c71 = /^[imsu]/,\n peg$c72 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c73 = \"/\",\n peg$c74 = peg$literalExpectation(\"/\", false),\n peg$c75 = /^[^\\/]/,\n peg$c76 = peg$classExpectation([\"/\"], true, false),\n peg$c77 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c78 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c79 = \":not(\",\n peg$c80 = peg$literalExpectation(\":not(\", false),\n peg$c81 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c82 = \":matches(\",\n peg$c83 = peg$literalExpectation(\":matches(\", false),\n peg$c84 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c85 = \":has(\",\n peg$c86 = peg$literalExpectation(\":has(\", false),\n peg$c87 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c88 = \":first-child\",\n peg$c89 = peg$literalExpectation(\":first-child\", false),\n peg$c90 = function() { return nth(1); },\n peg$c91 = \":last-child\",\n peg$c92 = peg$literalExpectation(\":last-child\", false),\n peg$c93 = function() { return nthLast(1); },\n peg$c94 = \":nth-child(\",\n peg$c95 = peg$literalExpectation(\":nth-child(\", false),\n peg$c96 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c97 = \":nth-last-child(\",\n peg$c98 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c100 = \":\",\n peg$c101 = peg$literalExpectation(\":\", false),\n peg$c102 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 30 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 30 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c24;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c35.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c21;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c37;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c42;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c44(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c47;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c47;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c48); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c56;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c58.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c51;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c54(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c56;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 30 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c62(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c64) {\n s1 = peg$c64;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c65); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c67); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c70(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 30 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c73;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c75.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c76); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c73;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c74); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 30 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c42;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c79) {\n s1 = peg$c79;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c80); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c81(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c82) {\n s1 = peg$c82;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c83); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 30 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c94) {\n s1 = peg$c94;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c95); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c96(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 30 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c97) {\n s1 = peg$c97;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c98); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c60.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c61); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c68;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c99(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 30 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c100;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c101); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c102(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @typedef {function} SelectorMatcher\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false;\n \n const name = selector.name.toLowerCase();\n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c22","peg$c25","peg$c28","peg$c31","peg$c33","peg$c35","peg$c36","peg$c38","peg$c39","a","peg$c40","peg$c41","peg$c43","peg$c45","op","value","operator","peg$c48","peg$c49","peg$c50","peg$c52","peg$c53","peg$c54","b","peg$c55","d","match","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c65","peg$c66","peg$c67","peg$c69","peg$c71","peg$c72","peg$c74","peg$c75","peg$c76","peg$c80","peg$c83","peg$c86","peg$c89","peg$c92","peg$c95","peg$c98","peg$c101","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","ss","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","concat","map","peg$parsesequence","reduce","memo","rhs","left","right","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","m","succeedingAncestry","parser","query","matches"],"mappings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B,IAAK,IAAIO,EAAI,EAAGyB,EAAIhC,EAAS7V,OAAQoW,EAAIyB,IAAKzB,EAAG,CAC7C,IAAM0B,EAAqBjC,EAASxK,MAAM+K,EAAI,GAC1CqB,EAAY1X,GAAG8V,EAASO,GAAI0B,EAAoBlM,IAChDzL,EAAQ0V,EAASO,GAAItX,EAAQgZ,SAKzC3X,EAAQlB,EAAMH,EAAQ+W,IAIlCvN,iBAAWuN,EAASW,SACpB7O,KAAMiE,GAAWA,EAAQ6K,YACzBhP,SAAUmE,GAAWA,EAAQnE,UAAY,eAajD,SAAS6G,EAAMkJ,EAAKjC,EAAU3J,GAC1B,IAAM+L,EAAU,GAIhB,OAHA1X,EAASuX,EAAKjC,GAAU,SAAUtW,GAC9B0Y,EAAQnR,KAAKvH,KACd2M,GACI+L,EAQX,SAASjM,EAAM6J,GACX,OAAOwC,EAAOrM,MAAM6J,GAUxB,SAASyC,EAAMR,EAAKjC,EAAU3J,GAC1B,OAAO0C,EAAMkJ,EAAK9L,EAAM6J,GAAW3J,UAGvCoM,EAAMtM,MAAQA,EACdsM,EAAM1J,MAAQA,EACd0J,EAAM/X,SAAWA,EACjB+X,EAAMC,QAvPN,SAAiBhZ,EAAMsW,EAAUM,EAAUjK,GACvC,OAAK2J,KACAtW,IACA4W,IAAYA,EAAW,IAErBP,EAAWC,EAAXD,CAAqBrW,EAAM4W,EAAUjK,KAmPhDoM,EAAMA,MAAQA"} \ No newline at end of file diff --git a/node_modules/esquery/package.json b/node_modules/esquery/package.json index 3d818750d..a1944fe66 100644 --- a/node_modules/esquery/package.json +++ b/node_modules/esquery/package.json @@ -1,6 +1,6 @@ { "name": "esquery", - "version": "1.4.0", + "version": "1.5.0", "author": "Joel Feenstra ", "contributors": [], "description": "A query library for ECMAScript AST using a CSS selector like query language.", @@ -58,10 +58,10 @@ "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.3", "babel-plugin-transform-es2017-object-entries": "0.0.5", - "chai": "^4.2.0", + "chai": "4.2.0", "eslint": "^6.8.0", "esprima": "~4.0.1", - "mocha": "^7.1.1", + "mocha": "7.1.1", "nyc": "^15.0.1", "pegjs": "~0.10.0", "rollup": "^1.32.1", diff --git a/node_modules/esquery/parser.js b/node_modules/esquery/parser.js index 36d590c58..640f84c9b 100644 --- a/node_modules/esquery/parser.js +++ b/node_modules/esquery/parser.js @@ -275,17 +275,7 @@ peg$c99 = function(n) { return nthLast(parseInt(n.join(''), 10)); }, peg$c100 = ":", peg$c101 = peg$literalExpectation(":", false), - peg$c102 = "statement", - peg$c103 = peg$literalExpectation("statement", true), - peg$c104 = "expression", - peg$c105 = peg$literalExpectation("expression", true), - peg$c106 = "declaration", - peg$c107 = peg$literalExpectation("declaration", true), - peg$c108 = "function", - peg$c109 = peg$literalExpectation("function", true), - peg$c110 = "pattern", - peg$c111 = peg$literalExpectation("pattern", true), - peg$c112 = function(c) { + peg$c102 = function(c) { return { type: 'class', name: c }; }, @@ -2497,52 +2487,10 @@ if (peg$silentFails === 0) { peg$fail(peg$c101); } } if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 9).toLowerCase() === peg$c102) { - s2 = input.substr(peg$currPos, 9); - peg$currPos += 9; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c103); } - } - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 10).toLowerCase() === peg$c104) { - s2 = input.substr(peg$currPos, 10); - peg$currPos += 10; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c105); } - } - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 11).toLowerCase() === peg$c106) { - s2 = input.substr(peg$currPos, 11); - peg$currPos += 11; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c107); } - } - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 8).toLowerCase() === peg$c108) { - s2 = input.substr(peg$currPos, 8); - peg$currPos += 8; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c109); } - } - if (s2 === peg$FAILED) { - if (input.substr(peg$currPos, 7).toLowerCase() === peg$c110) { - s2 = input.substr(peg$currPos, 7); - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c111); } - } - } - } - } - } + s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c112(s2); + s1 = peg$c102(s2); s0 = s1; } else { peg$currPos = s0; diff --git a/node_modules/expect/LICENSE b/node_modules/expect/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/expect/LICENSE +++ b/node_modules/expect/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/expect/build/extractExpectedAssertionsErrors.js b/node_modules/expect/build/extractExpectedAssertionsErrors.js index 60d476c6b..1c6bebeb6 100644 --- a/node_modules/expect/build/extractExpectedAssertionsErrors.js +++ b/node_modules/expect/build/extractExpectedAssertionsErrors.js @@ -7,7 +7,7 @@ exports.default = void 0; var _jestMatcherUtils = require('jest-matcher-utils'); var _jestMatchersObject = require('./jestMatchersObject'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/expect/build/index.d.ts b/node_modules/expect/build/index.d.ts index 693e3deb3..248459fda 100644 --- a/node_modules/expect/build/index.d.ts +++ b/node_modules/expect/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -53,9 +53,9 @@ export declare interface BaseExpect { } export declare type Expect = { - (actual: T): Matchers & - Inverse> & - PromiseMatchers; + (actual: T): Matchers & + Inverse> & + PromiseMatchers; } & BaseExpect & AsymmetricMatchers & Inverse>; @@ -101,7 +101,7 @@ export declare type MatcherFunctionWithContext< ...expected: Expected ) => ExpectationResult; -export declare interface Matchers> { +export declare interface Matchers, T = unknown> { /** * Ensures the last call to a mock function was provided specific args. */ @@ -340,17 +340,17 @@ export declare interface MatcherUtils { }; } -declare type PromiseMatchers = { +declare type PromiseMatchers = { /** * Unwraps the reason of a rejected promise so any other matcher can be chained. * If the promise is fulfilled the assertion fails. */ - rejects: Matchers> & Inverse>>; + rejects: Matchers, T> & Inverse, T>>; /** * Unwraps the value of a fulfilled promise so any other matcher can be chained. * If the promise is rejected the assertion fails. */ - resolves: Matchers> & Inverse>>; + resolves: Matchers, T> & Inverse, T>>; }; declare type RawMatcherFn = { diff --git a/node_modules/expect/build/matchers.js b/node_modules/expect/build/matchers.js index a85aaa016..6b298bfbe 100644 --- a/node_modules/expect/build/matchers.js +++ b/node_modules/expect/build/matchers.js @@ -9,7 +9,7 @@ var _jestGetType = require('jest-get-type'); var _jestMatcherUtils = require('jest-matcher-utils'); var _print = require('./print'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/expect/build/print.js b/node_modules/expect/build/print.js index 74e116139..dc763f540 100644 --- a/node_modules/expect/build/print.js +++ b/node_modules/expect/build/print.js @@ -14,7 +14,7 @@ exports.printReceivedStringContainExpectedSubstring = void 0; var _jestMatcherUtils = require('jest-matcher-utils'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/expect/build/spyMatchers.js b/node_modules/expect/build/spyMatchers.js index 36a7f54c7..d38fa6535 100644 --- a/node_modules/expect/build/spyMatchers.js +++ b/node_modules/expect/build/spyMatchers.js @@ -9,7 +9,7 @@ var _jestGetType = require('jest-get-type'); var _jestMatcherUtils = require('jest-matcher-utils'); var _jestMatchersObject = require('./jestMatchersObject'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/expect/build/toThrowMatchers.js b/node_modules/expect/build/toThrowMatchers.js index 30d7b795b..39e0a012e 100644 --- a/node_modules/expect/build/toThrowMatchers.js +++ b/node_modules/expect/build/toThrowMatchers.js @@ -9,7 +9,7 @@ var _jestMatcherUtils = require('jest-matcher-utils'); var _jestMessageUtil = require('jest-message-util'); var _print = require('./print'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -203,7 +203,13 @@ const toThrowExpectedAsymmetric = (matcherName, options, thrown, expected) => { }; }; const toThrowExpectedObject = (matcherName, options, thrown, expected) => { - const pass = thrown !== null && thrown.message === expected.message; + const expectedMessageAndCause = createMessageAndCause(expected); + const thrownMessageAndCause = + thrown !== null ? createMessageAndCause(thrown.value) : null; + const pass = + thrown !== null && + thrown.message === expected.message && + thrownMessageAndCause === expectedMessageAndCause; const message = pass ? () => // eslint-disable-next-line prefer-template @@ -214,7 +220,10 @@ const toThrowExpectedObject = (matcherName, options, thrown, expected) => { options ) + '\n\n' + - formatExpected('Expected message: not ', expected.message) + + formatExpected( + `Expected ${messageAndCause(expected)}: not `, + expectedMessageAndCause + ) + (thrown !== null && thrown.hasMessage ? formatStack(thrown) : formatReceived('Received value: ', thrown, 'value')) @@ -229,22 +238,27 @@ const toThrowExpectedObject = (matcherName, options, thrown, expected) => { '\n\n' + (thrown === null ? // eslint-disable-next-line prefer-template - formatExpected('Expected message: ', expected.message) + + formatExpected( + `Expected ${messageAndCause(expected)}: `, + expectedMessageAndCause + ) + '\n' + DID_NOT_THROW : thrown.hasMessage ? // eslint-disable-next-line prefer-template (0, _jestMatcherUtils.printDiffOrStringify)( - expected.message, - thrown.message, - 'Expected message', - 'Received message', + expectedMessageAndCause, + thrownMessageAndCause, + `Expected ${messageAndCause(expected)}`, + `Received ${messageAndCause(thrown.value)}`, true ) + '\n' + formatStack(thrown) - : formatExpected('Expected message: ', expected.message) + - formatReceived('Received value: ', thrown, 'value')); + : formatExpected( + `Expected ${messageAndCause(expected)}: `, + expectedMessageAndCause + ) + formatReceived('Received value: ', thrown, 'value')); return { message, pass @@ -446,5 +460,22 @@ const formatStack = thrown => noStackTrace: false } ); +function createMessageAndCauseMessage(error) { + if (error.cause instanceof Error) { + return `{ message: ${error.message}, cause: ${createMessageAndCauseMessage( + error.cause + )}}`; + } + return `{ message: ${error.message} }`; +} +function createMessageAndCause(error) { + if (error.cause instanceof Error) { + return createMessageAndCauseMessage(error); + } + return error.message; +} +function messageAndCause(error) { + return error.cause === undefined ? 'message' : 'message and cause'; +} var _default = matchers; exports.default = _default; diff --git a/node_modules/expect/package.json b/node_modules/expect/package.json index 1a598e6bb..8a08984f9 100644 --- a/node_modules/expect/package.json +++ b/node_modules/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,15 +19,15 @@ "./build/toThrowMatchers": "./build/toThrowMatchers.js" }, "dependencies": { - "@jest/expect-utils": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1" + "@jest/expect-utils": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0" }, "devDependencies": { "@fast-check/jest": "^1.3.0", - "@jest/test-utils": "^29.4.1", + "@jest/test-utils": "^29.5.0", "@tsd/typescript": "^4.9.0", "chalk": "^4.0.0", "immutable": "^4.0.0", @@ -39,5 +39,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/globals/globals.json b/node_modules/globals/globals.json index a0eac087f..c8460073c 100644 --- a/node_modules/globals/globals.json +++ b/node_modules/globals/globals.json @@ -1182,7 +1182,9 @@ "EventTarget": false, "exports": true, "fetch": false, + "FormData": false, "global": false, + "Headers": false, "Intl": false, "MessageChannel": false, "MessageEvent": false, @@ -1191,7 +1193,9 @@ "performance": false, "process": false, "queueMicrotask": false, + "Request": false, "require": false, + "Response": false, "setImmediate": false, "setInterval": false, "setTimeout": false, @@ -1215,7 +1219,9 @@ "Event": false, "EventTarget": false, "fetch": false, + "FormData": false, "global": false, + "Headers": false, "Intl": false, "MessageChannel": false, "MessageEvent": false, @@ -1223,6 +1229,8 @@ "performance": false, "process": false, "queueMicrotask": false, + "Request": false, + "Response": false, "setImmediate": false, "setInterval": false, "setTimeout": false, @@ -1721,12 +1729,16 @@ "Event": false, "EventTarget": false, "fetch": false, + "FormData": false, + "Headers": false, "Intl": false, "MessageChannel": false, "MessageEvent": false, "MessagePort": false, "performance": false, "queueMicrotask": false, + "Request": false, + "Response": false, "setInterval": false, "setTimeout": false, "structuredClone": false, diff --git a/node_modules/globals/package.json b/node_modules/globals/package.json index 6fc85a11e..17cc85afb 100644 --- a/node_modules/globals/package.json +++ b/node_modules/globals/package.json @@ -1,6 +1,6 @@ { "name": "globals", - "version": "13.19.0", + "version": "13.20.0", "description": "Global identifiers from different JavaScript environments", "license": "MIT", "repository": "sindresorhus/globals", diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json index 305785687..87babf024 100644 --- a/node_modules/graceful-fs/package.json +++ b/node_modules/graceful-fs/package.json @@ -1,7 +1,7 @@ { "name": "graceful-fs", "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.10", + "version": "4.2.11", "repository": { "type": "git", "url": "https://github.com/isaacs/node-graceful-fs" @@ -38,7 +38,7 @@ "import-fresh": "^2.0.0", "mkdirp": "^0.5.0", "rimraf": "^2.2.8", - "tap": "^12.7.0" + "tap": "^16.3.4" }, "files": [ "fs.js", @@ -46,5 +46,8 @@ "legacy-streams.js", "polyfills.js", "clone.js" - ] + ], + "tap": { + "reporter": "classic" + } } diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js index 46dea36cc..453f1a9e7 100644 --- a/node_modules/graceful-fs/polyfills.js +++ b/node_modules/graceful-fs/polyfills.js @@ -101,7 +101,7 @@ function patch (fs) { var backoff = 0; fs$rename(from, to, function CB (er) { if (er - && (er.code === "EACCES" || er.code === "EPERM") + && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 60000) { setTimeout(function() { fs.stat(to, function (stater, st) { diff --git a/node_modules/jest-changed-files/LICENSE b/node_modules/jest-changed-files/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-changed-files/LICENSE +++ b/node_modules/jest-changed-files/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-changed-files/build/git.js b/node_modules/jest-changed-files/build/git.js index 069e8ff36..4a443e426 100644 --- a/node_modules/jest-changed-files/build/git.js +++ b/node_modules/jest-changed-files/build/git.js @@ -69,7 +69,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-changed-files/build/hg.js b/node_modules/jest-changed-files/build/hg.js index 19b5dfbc3..b6836c0c4 100644 --- a/node_modules/jest-changed-files/build/hg.js +++ b/node_modules/jest-changed-files/build/hg.js @@ -69,7 +69,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-changed-files/build/index.d.ts b/node_modules/jest-changed-files/build/index.d.ts index 9dc1e7698..fd8e08bf3 100644 --- a/node_modules/jest-changed-files/build/index.d.ts +++ b/node_modules/jest-changed-files/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -30,6 +30,7 @@ declare type Paths = Set; declare type Repos = { git: Paths; hg: Paths; + sl: Paths; }; export {}; diff --git a/node_modules/jest-changed-files/build/index.js b/node_modules/jest-changed-files/build/index.js index 15c2ac935..db613d844 100644 --- a/node_modules/jest-changed-files/build/index.js +++ b/node_modules/jest-changed-files/build/index.js @@ -13,11 +13,12 @@ function _pLimit() { } var _git = _interopRequireDefault(require('./git')); var _hg = _interopRequireDefault(require('./hg')); +var _sl = _interopRequireDefault(require('./sl')); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -33,6 +34,7 @@ function notEmpty(value) { const mutex = (0, _pLimit().default)(5); const findGitRoot = dir => mutex(() => _git.default.getRoot(dir)); const findHgRoot = dir => mutex(() => _hg.default.getRoot(dir)); +const findSlRoot = dir => mutex(() => _sl.default.getRoot(dir)); const getChangedFilesForRoots = async (roots, options) => { const repos = await findRepos(roots); const changedFilesOptions = { @@ -45,8 +47,11 @@ const getChangedFilesForRoots = async (roots, options) => { const hgPromises = Array.from(repos.hg).map(repo => _hg.default.findChangedFiles(repo, changedFilesOptions) ); + const slPromises = Array.from(repos.sl).map(repo => + _sl.default.findChangedFiles(repo, changedFilesOptions) + ); const changedFiles = ( - await Promise.all(gitPromises.concat(hgPromises)) + await Promise.all([...gitPromises, ...hgPromises, ...slPromises]) ).reduce((allFiles, changedFilesInTheRepo) => { for (const file of changedFilesInTheRepo) { allFiles.add(file); @@ -66,9 +71,11 @@ const findRepos = async roots => { const hgRepos = await Promise.all( roots.reduce((promises, root) => promises.concat(findHgRoot(root)), []) ); + const slRepos = await Promise.all(roots.map(findSlRoot)); return { git: new Set(gitRepos.filter(notEmpty)), - hg: new Set(hgRepos.filter(notEmpty)) + hg: new Set(hgRepos.filter(notEmpty)), + sl: new Set(slRepos.filter(notEmpty)) }; }; exports.findRepos = findRepos; diff --git a/node_modules/jest-changed-files/build/sl.js b/node_modules/jest-changed-files/build/sl.js new file mode 100644 index 000000000..6c42e589f --- /dev/null +++ b/node_modules/jest-changed-files/build/sl.js @@ -0,0 +1,134 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; +function path() { + const data = _interopRequireWildcard(require('path')); + path = function () { + return data; + }; + return data; +} +function _util() { + const data = require('util'); + _util = function () { + return data; + }; + return data; +} +function _execa() { + const data = _interopRequireDefault(require('execa')); + _execa = function () { + return data; + }; + return data; +} +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== 'function') return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function (nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return {default: obj}; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = + Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +/** + * Disable any configuration settings that might change Sapling's default output. + * More info in `sl help environment`. _HG_PLAIN is intentional + */ +const env = { + ...process.env, + HGPLAIN: '1' +}; +const adapter = { + findChangedFiles: async (cwd, options) => { + const includePaths = options.includePaths ?? []; + const args = ['status', '-amnu']; + if (options.withAncestor === true) { + args.push('--rev', 'first(min(!public() & ::.)^+.^)'); + } else if ( + options.changedSince != null && + options.changedSince.length > 0 + ) { + args.push('--rev', `ancestor(., ${options.changedSince})`); + } else if (options.lastCommit === true) { + args.push('--change', '.'); + } + args.push(...includePaths); + let result; + try { + result = await (0, _execa().default)('sl', args, { + cwd, + env + }); + } catch (e) { + if (_util().types.isNativeError(e)) { + const err = e; + // TODO: Should we keep the original `message`? + err.message = err.stderr; + } + throw e; + } + return result.stdout + .split('\n') + .filter(s => s !== '') + .map(changedPath => path().resolve(cwd, changedPath)); + }, + getRoot: async cwd => { + try { + const result = await (0, _execa().default)('sl', ['root'], { + cwd, + env + }); + return result.stdout; + } catch { + return null; + } + } +}; +var _default = adapter; +exports.default = _default; diff --git a/node_modules/jest-changed-files/package.json b/node_modules/jest-changed-files/package.json index fb6f22671..24ac3c1bd 100644 --- a/node_modules/jest-changed-files/package.json +++ b/node_modules/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "29.4.0", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -26,5 +26,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "4bc0e8acaf990e6618a7bed1dca67760c20bb12a" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-circus/LICENSE b/node_modules/jest-circus/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-circus/LICENSE +++ b/node_modules/jest-circus/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-circus/build/formatNodeAssertErrors.js b/node_modules/jest-circus/build/formatNodeAssertErrors.js index 35072f704..a608c5930 100644 --- a/node_modules/jest-circus/build/formatNodeAssertErrors.js +++ b/node_modules/jest-circus/build/formatNodeAssertErrors.js @@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-circus/build/globalErrorHandlers.js b/node_modules/jest-circus/build/globalErrorHandlers.js index 05981ad9e..888232a03 100644 --- a/node_modules/jest-circus/build/globalErrorHandlers.js +++ b/node_modules/jest-circus/build/globalErrorHandlers.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.restoreGlobalErrorHandlers = exports.injectGlobalErrorHandlers = void 0; var _state = require('./state'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-circus/build/index.d.ts b/node_modules/jest-circus/build/index.d.ts index 6e3576892..654496e76 100644 --- a/node_modules/jest-circus/build/index.d.ts +++ b/node_modules/jest-circus/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-circus/build/index.js b/node_modules/jest-circus/build/index.js index 9c8277710..97a2521c3 100644 --- a/node_modules/jest-circus/build/index.js +++ b/node_modules/jest-circus/build/index.js @@ -44,7 +44,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js index dfa0f7dbb..423eeb4b2 100644 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js +++ b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = void 0; var _jestUtil = require('jest-util'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js index 6680512eb..1528b99d5 100644 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js +++ b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js @@ -19,7 +19,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -39,6 +39,8 @@ const initialize = async ({ (0, _state.getState)().testTimeout = globalConfig.testTimeout; } (0, _state.getState)().maxConcurrency = globalConfig.maxConcurrency; + (0, _state.getState)().randomize = globalConfig.randomize; + (0, _state.getState)().seed = globalConfig.seed; // @ts-expect-error: missing `concurrent` which is added later const globalsObject = { diff --git a/node_modules/jest-circus/build/run.js b/node_modules/jest-circus/build/run.js index e68f12abf..c1fabdfa9 100644 --- a/node_modules/jest-circus/build/run.js +++ b/node_modules/jest-circus/build/run.js @@ -5,25 +5,67 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; var _pLimit = _interopRequireDefault(require('p-limit')); +var _shuffleArray = _interopRequireWildcard(require('./shuffleArray')); var _state = require('./state'); var _types = require('./types'); var _utils = require('./utils'); +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== 'function') return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function (nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return {default: obj}; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = + Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ const run = async () => { - const {rootDescribeBlock} = (0, _state.getState)(); + const {rootDescribeBlock, seed, randomize} = (0, _state.getState)(); + const rng = randomize ? (0, _shuffleArray.rngBuilder)(seed) : undefined; await (0, _state.dispatch)({ name: 'run_start' }); - await _runTestsForDescribeBlock(rootDescribeBlock, true); + await _runTestsForDescribeBlock(rootDescribeBlock, rng, true); await (0, _state.dispatch)({ name: 'run_finish' }); @@ -34,6 +76,7 @@ const run = async () => { }; const _runTestsForDescribeBlock = async ( describeBlock, + rng, isRootBlock = false ) => { await (0, _state.dispatch)({ @@ -75,10 +118,16 @@ const _runTestsForDescribeBlock = async ( // eslint-disable-next-line no-restricted-globals const retryTimes = parseInt(global[_types.RETRY_TIMES], 10) || 0; const deferredRetryTests = []; + if (rng) { + describeBlock.children = (0, _shuffleArray.default)( + describeBlock.children, + rng + ); + } for (const child of describeBlock.children) { switch (child.type) { case 'describeBlock': { - await _runTestsForDescribeBlock(child); + await _runTestsForDescribeBlock(child, rng); break; } case 'test': { diff --git a/node_modules/jest-circus/build/shuffleArray.js b/node_modules/jest-circus/build/shuffleArray.js new file mode 100644 index 000000000..596d19bff --- /dev/null +++ b/node_modules/jest-circus/build/shuffleArray.js @@ -0,0 +1,39 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = shuffleArray; +exports.rngBuilder = void 0; +var _pureRand = require('pure-rand'); +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const rngBuilder = seed => { + const gen = (0, _pureRand.xoroshiro128plus)(seed); + return { + next: (from, to) => + (0, _pureRand.unsafeUniformIntDistribution)(from, to, gen) + }; +}; + +// Fisher-Yates shuffle +// This is performed in-place +exports.rngBuilder = rngBuilder; +function shuffleArray(array, random) { + const length = array.length; + if (length === 0) { + return []; + } + for (let i = 0; i < length; i++) { + const n = random.next(i, length - 1); + const value = array[i]; + array[i] = array[n]; + array[n] = value; + } + return array; +} diff --git a/node_modules/jest-circus/build/state.js b/node_modules/jest-circus/build/state.js index d98a63988..0fe5e8d4b 100644 --- a/node_modules/jest-circus/build/state.js +++ b/node_modules/jest-circus/build/state.js @@ -21,7 +21,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -44,6 +44,7 @@ const createState = () => { maxConcurrency: 5, parentProcess: null, rootDescribeBlock: ROOT_DESCRIBE_BLOCK, + seed: 0, testNamePattern: null, testTimeout: 5000, unhandledErrors: [] diff --git a/node_modules/jest-circus/build/testCaseReportHandler.js b/node_modules/jest-circus/build/testCaseReportHandler.js index 24f0b3d07..b3153be6e 100644 --- a/node_modules/jest-circus/build/testCaseReportHandler.js +++ b/node_modules/jest-circus/build/testCaseReportHandler.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = void 0; var _utils = require('./utils'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -14,6 +14,7 @@ var _utils = require('./utils'); const testCaseReportHandler = (testPath, sendMessageToJest) => event => { switch (event.name) { + case 'test_todo': case 'test_done': { const testResult = (0, _utils.makeSingleTestResult)(event.test); const testCaseResult = (0, _utils.parseSingleTestResult)(testResult); diff --git a/node_modules/jest-circus/build/types.js b/node_modules/jest-circus/build/types.js index d351ca252..7bdfae848 100644 --- a/node_modules/jest-circus/build/types.js +++ b/node_modules/jest-circus/build/types.js @@ -10,7 +10,7 @@ exports.TEST_TIMEOUT_SYMBOL = void 0; var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-circus/build/utils.js b/node_modules/jest-circus/build/utils.js index 400c5e2ce..755741b76 100644 --- a/node_modules/jest-circus/build/utils.js +++ b/node_modules/jest-circus/build/utils.js @@ -205,10 +205,12 @@ const describeBlockHasTests = describe => child => child.type === 'test' || describeBlockHasTests(child) ); exports.describeBlockHasTests = describeBlockHasTests; -const _makeTimeoutMessage = (timeout, isHook) => +const _makeTimeoutMessage = (timeout, isHook, takesDoneCallback) => `Exceeded timeout of ${(0, _jestUtil.formatTime)(timeout)} for a ${ isHook ? 'hook' : 'test' - }.\nUse jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.`; + }${ + takesDoneCallback ? ' while waiting for `done()` to be called' : '' + }.\nAdd a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout.`; // Global values can be overwritten by mocks or tests. We'll capture // the original values in the variables before we require any files. @@ -220,15 +222,16 @@ const callAsyncCircusFn = (testOrHook, testContext, {isHook, timeout}) => { let timeoutID; let completed = false; const {fn, asyncError} = testOrHook; + const doneCallback = takesDoneCallback(fn); return new Promise((resolve, reject) => { timeoutID = setTimeout( - () => reject(_makeTimeoutMessage(timeout, isHook)), + () => reject(_makeTimeoutMessage(timeout, isHook, doneCallback)), timeout ); // If this fn accepts `done` callback we return a promise that fulfills as // soon as `done` called. - if (takesDoneCallback(fn)) { + if (doneCallback) { let returnedValue = undefined; const done = reason => { // We need to keep a stack here before the promise tick diff --git a/node_modules/jest-circus/package.json b/node_modules/jest-circus/package.json index e092a2e6e..e8e8b8067 100644 --- a/node_modules/jest-circus/package.json +++ b/node_modules/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,23 +18,24 @@ "./runner": "./runner.js" }, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", + "jest-each": "^29.5.0", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "p-limit": "^3.1.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -54,5 +55,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-circus/runner.js b/node_modules/jest-circus/runner.js index f61fd8882..de11d642a 100644 --- a/node_modules/jest-circus/runner.js +++ b/node_modules/jest-circus/runner.js @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/LICENSE b/node_modules/jest-cli/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-cli/LICENSE +++ b/node_modules/jest-cli/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-cli/bin/jest.js b/node_modules/jest-cli/bin/jest.js index 146fb2c40..3ddf9403c 100755 --- a/node_modules/jest-cli/bin/jest.js +++ b/node_modules/jest-cli/bin/jest.js @@ -1,6 +1,6 @@ #!/usr/bin/env node /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/build/args.js b/node_modules/jest-cli/build/args.js index ddbb36814..170606fcb 100644 --- a/node_modules/jest-cli/build/args.js +++ b/node_modules/jest-cli/build/args.js @@ -13,7 +13,7 @@ function _jestConfig() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -25,8 +25,7 @@ function check(argv) { Object.prototype.hasOwnProperty.call(argv, 'maxWorkers') ) { throw new Error( - 'Both --runInBand and --maxWorkers were specified, but these two ' + - 'options do not make sense together. Which is it?' + 'Both --runInBand and --maxWorkers were specified, only one is allowed.' ); } for (const key of [ @@ -37,16 +36,15 @@ function check(argv) { ]) { if (argv[key] && argv.watchAll) { throw new Error( - `Both --${key} and --watchAll were specified, but these two ` + - 'options do not make sense together. Try the --watch option which ' + - 'reruns only tests related to changed files.' + `Both --${key} and --watchAll were specified, but cannot be used ` + + 'together. Try the --watch option which reruns only tests ' + + 'related to changed files.' ); } } if (argv.onlyFailures && argv.watchAll) { throw new Error( - 'Both --onlyFailures and --watchAll were specified, but these two ' + - 'options do not make sense together.' + 'Both --onlyFailures and --watchAll were specified, only one is allowed.' ); } if (argv.findRelatedTests && argv._.length === 0) { @@ -425,6 +423,12 @@ const options = { description: 'Run tests that failed in the previous execution.', type: 'boolean' }, + openHandlesTimeout: { + description: + 'Print a warning about probable open handles if Jest does not exit ' + + 'cleanly after this number of milliseconds. `0` to disable.', + type: 'number' + }, outputFile: { description: 'Write test results to a file when the --json option is ' + @@ -451,6 +455,11 @@ const options = { string: true, type: 'array' }, + randomize: { + description: + 'Shuffle the order of the tests within a file. In order to choose the seed refer to the `--seed` CLI option.', + type: 'boolean' + }, reporters: { description: 'A list of custom reporters for the test suite.', string: true, @@ -711,6 +720,12 @@ const options = { 'Whether to use watchman for file crawling. Disable using ' + '--no-watchman.', type: 'boolean' + }, + workerThreads: { + description: + 'Whether to use worker threads for parallelization. Child processes ' + + 'are used by default.', + type: 'boolean' } }; exports.options = options; diff --git a/node_modules/jest-cli/build/index.d.ts b/node_modules/jest-cli/build/index.d.ts index 2e3820430..886800935 100644 --- a/node_modules/jest-cli/build/index.d.ts +++ b/node_modules/jest-cli/build/index.d.ts @@ -1,12 +1,18 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ +import type {Options} from 'yargs'; + export declare function run( maybeArgv?: Array, project?: string, ): Promise; +export declare const yargsOptions: { + [key: string]: Options; +}; + export {}; diff --git a/node_modules/jest-cli/build/index.js b/node_modules/jest-cli/build/index.js index d1fd94e6b..fc00c8bfb 100644 --- a/node_modules/jest-cli/build/index.js +++ b/node_modules/jest-cli/build/index.js @@ -9,4 +9,11 @@ Object.defineProperty(exports, 'run', { return _run.run; } }); +Object.defineProperty(exports, 'yargsOptions', { + enumerable: true, + get: function () { + return _args.options; + } +}); var _run = require('./run'); +var _args = require('./args'); diff --git a/node_modules/jest-cli/build/init/errors.js b/node_modules/jest-cli/build/init/errors.js index 6850ccb63..ad7f9756e 100644 --- a/node_modules/jest-cli/build/init/errors.js +++ b/node_modules/jest-cli/build/init/errors.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.NotFoundPackageJsonError = exports.MalformedPackageJsonError = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/build/init/generateConfigFile.js b/node_modules/jest-cli/build/init/generateConfigFile.js index 4eb9ae009..0e137ca04 100644 --- a/node_modules/jest-cli/build/init/generateConfigFile.js +++ b/node_modules/jest-cli/build/init/generateConfigFile.js @@ -12,7 +12,7 @@ function _jestConfig() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/build/init/index.js b/node_modules/jest-cli/build/init/index.js index 81c40ef54..ced03ee7e 100644 --- a/node_modules/jest-cli/build/init/index.js +++ b/node_modules/jest-cli/build/init/index.js @@ -96,7 +96,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/build/init/modifyPackageJson.js b/node_modules/jest-cli/build/init/modifyPackageJson.js index 3a3680530..d998a8449 100644 --- a/node_modules/jest-cli/build/init/modifyPackageJson.js +++ b/node_modules/jest-cli/build/init/modifyPackageJson.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/build/init/questions.js b/node_modules/jest-cli/build/init/questions.js index fa5b8e040..3e3b35a7a 100644 --- a/node_modules/jest-cli/build/init/questions.js +++ b/node_modules/jest-cli/build/init/questions.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.testScriptQuestion = exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-cli/build/run.js b/node_modules/jest-cli/build/run.js index de7b19062..a04b33585 100644 --- a/node_modules/jest-cli/build/run.js +++ b/node_modules/jest-cli/build/run.js @@ -107,7 +107,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -210,11 +210,17 @@ const readResultsAndExit = (result, globalConfig) => { ); } (0, _exit().default)(code); - } else if (!globalConfig.detectOpenHandles) { + } else if ( + !globalConfig.detectOpenHandles && + globalConfig.openHandlesTimeout !== 0 + ) { + const timeout = globalConfig.openHandlesTimeout; setTimeout(() => { console.warn( _chalk().default.yellow.bold( - 'Jest did not exit one second after the test run has completed.\n\n' + `Jest did not exit ${ + timeout === 1000 ? 'one second' : `${timeout / 1000} seconds` + } after the test run has completed.\n\n'` ) + _chalk().default.yellow( 'This usually means that there are asynchronous operations that ' + @@ -222,6 +228,6 @@ const readResultsAndExit = (result, globalConfig) => { '`--detectOpenHandles` to troubleshoot this issue.' ) ); - }, 1000).unref(); + }, timeout).unref(); } }; diff --git a/node_modules/jest-cli/package.json b/node_modules/jest-cli/package.json index 0ce4e1f48..e55264aa3 100644 --- a/node_modules/jest-cli/package.json +++ b/node_modules/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "29.4.1", + "version": "29.5.0", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { @@ -13,16 +13,16 @@ "./bin/jest": "./bin/jest.js" }, "dependencies": { - "@jest/core": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-config": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -30,7 +30,8 @@ "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.3", "@types/prompts": "^2.0.1", - "@types/yargs": "^17.0.8" + "@types/yargs": "^17.0.8", + "tsd-lite": "^0.6.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -85,5 +86,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-config/LICENSE b/node_modules/jest-config/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-config/LICENSE +++ b/node_modules/jest-config/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-config/build/Defaults.js b/node_modules/jest-config/build/Defaults.js index b1782c9d0..ee5c7b1a6 100644 --- a/node_modules/jest-config/build/Defaults.js +++ b/node_modules/jest-config/build/Defaults.js @@ -31,7 +31,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -88,6 +88,7 @@ const defaultOptions = { noStackTrace: false, notify: false, notifyMode: 'failure-change', + openHandlesTimeout: 1000, passWithNoTests: false, prettierPath: 'prettier', resetMocks: false, @@ -121,7 +122,8 @@ const defaultOptions = { useStderr: false, watch: false, watchPathIgnorePatterns: [], - watchman: true + watchman: true, + workerThreads: false }; var _default = defaultOptions; exports.default = _default; diff --git a/node_modules/jest-config/build/Deprecated.js b/node_modules/jest-config/build/Deprecated.js index 4c4a27a9a..e13c1659e 100644 --- a/node_modules/jest-config/build/Deprecated.js +++ b/node_modules/jest-config/build/Deprecated.js @@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/Descriptions.js b/node_modules/jest-config/build/Descriptions.js index 184e03dfa..d46491cd1 100644 --- a/node_modules/jest-config/build/Descriptions.js +++ b/node_modules/jest-config/build/Descriptions.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/ReporterValidationErrors.js b/node_modules/jest-config/build/ReporterValidationErrors.js index 66c08a32b..2be0df373 100644 --- a/node_modules/jest-config/build/ReporterValidationErrors.js +++ b/node_modules/jest-config/build/ReporterValidationErrors.js @@ -32,7 +32,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/ValidConfig.js b/node_modules/jest-config/build/ValidConfig.js index 00ffb830f..889ea1e5e 100644 --- a/node_modules/jest-config/build/ValidConfig.js +++ b/node_modules/jest-config/build/ValidConfig.js @@ -27,7 +27,7 @@ function _prettyFormat() { } var _constants = require('./constants'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -141,10 +141,12 @@ const initialOptions = { notifyMode: 'failure-change', onlyChanged: false, onlyFailures: false, + openHandlesTimeout: 1000, passWithNoTests: false, preset: 'react-native', prettierPath: '/node_modules/prettier', projects: ['project-a', 'project-b/'], + randomize: false, reporters: [ 'default', 'custom-reporter-1', @@ -215,7 +217,8 @@ const initialOptions = { ] ], watchman: true, - workerIdleMemoryLimit: (0, _jestValidate().multipleValidOptions)(0.2, '50%') + workerIdleMemoryLimit: (0, _jestValidate().multipleValidOptions)(0.2, '50%'), + workerThreads: true }; exports.initialOptions = initialOptions; const initialProjectOptions = { @@ -293,6 +296,7 @@ const initialProjectOptions = { }, modulePathIgnorePatterns: ['/build/'], modulePaths: ['/shared/vendor/modules'], + openHandlesTimeout: 1000, preset: 'react-native', prettierPath: '/node_modules/prettier', resetMocks: false, diff --git a/node_modules/jest-config/build/color.js b/node_modules/jest-config/build/color.js index 24a26ad74..ac0bf905c 100644 --- a/node_modules/jest-config/build/color.js +++ b/node_modules/jest-config/build/color.js @@ -12,7 +12,7 @@ function _crypto() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/constants.js b/node_modules/jest-config/build/constants.js index ec0c23895..273cd39e5 100644 --- a/node_modules/jest-config/build/constants.js +++ b/node_modules/jest-config/build/constants.js @@ -62,7 +62,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/getCacheDirectory.js b/node_modules/jest-config/build/getCacheDirectory.js index e2c660a2e..896ef992f 100644 --- a/node_modules/jest-config/build/getCacheDirectory.js +++ b/node_modules/jest-config/build/getCacheDirectory.js @@ -66,7 +66,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/getMaxWorkers.js b/node_modules/jest-config/build/getMaxWorkers.js index 9e75c66f1..7a4374191 100644 --- a/node_modules/jest-config/build/getMaxWorkers.js +++ b/node_modules/jest-config/build/getMaxWorkers.js @@ -12,7 +12,7 @@ function _os() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/index.d.ts b/node_modules/jest-config/build/index.d.ts index bf1bf8949..e3165e0f4 100644 --- a/node_modules/jest-config/build/index.d.ts +++ b/node_modules/jest-config/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/index.js b/node_modules/jest-config/build/index.js index d7c6608f4..77b0024bc 100644 --- a/node_modules/jest-config/build/index.js +++ b/node_modules/jest-config/build/index.js @@ -126,7 +126,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -206,9 +206,11 @@ const groupOptions = options => ({ notifyMode: options.notifyMode, onlyChanged: options.onlyChanged, onlyFailures: options.onlyFailures, + openHandlesTimeout: options.openHandlesTimeout, outputFile: options.outputFile, passWithNoTests: options.passWithNoTests, projects: options.projects, + randomize: options.randomize, replname: options.replname, reporters: options.reporters, rootDir: options.rootDir, @@ -232,7 +234,8 @@ const groupOptions = options => ({ watchAll: options.watchAll, watchPlugins: options.watchPlugins, watchman: options.watchman, - workerIdleMemoryLimit: options.workerIdleMemoryLimit + workerIdleMemoryLimit: options.workerIdleMemoryLimit, + workerThreads: options.workerThreads }), projectConfig: Object.freeze({ automock: options.automock, @@ -261,6 +264,7 @@ const groupOptions = options => ({ moduleNameMapper: options.moduleNameMapper, modulePathIgnorePatterns: options.modulePathIgnorePatterns, modulePaths: options.modulePaths, + openHandlesTimeout: options.openHandlesTimeout, prettierPath: options.prettierPath, resetMocks: options.resetMocks, resetModules: options.resetModules, diff --git a/node_modules/jest-config/build/normalize.js b/node_modules/jest-config/build/normalize.js index 49fc78434..62246fa8f 100644 --- a/node_modules/jest-config/build/normalize.js +++ b/node_modules/jest-config/build/normalize.js @@ -144,7 +144,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -937,8 +937,10 @@ async function normalize( case 'notifyMode': case 'onlyChanged': case 'onlyFailures': + case 'openHandlesTimeout': case 'outputFile': case 'passWithNoTests': + case 'randomize': case 'replname': case 'resetMocks': case 'resetModules': @@ -961,6 +963,7 @@ async function normalize( case 'watch': case 'watchAll': case 'watchman': + case 'workerThreads': value = oldOptions[key]; break; case 'workerIdleMemoryLimit': @@ -1051,10 +1054,12 @@ async function normalize( // files unless `--watch` is also passed. newOptions.onlyChanged = newOptions.watch; } - newOptions.showSeed = newOptions.showSeed || argv.showSeed; + newOptions.randomize = newOptions.randomize || argv.randomize; + newOptions.showSeed = + newOptions.randomize || newOptions.showSeed || argv.showSeed; const upperBoundSeedValue = 2 ** 31; - // xoroshiro128plus is used in v8 and is used here (at time of writing) + // bounds are determined by xoroshiro128plus which is used in v8 and is used here (at time of writing) newOptions.seed = argv.seed ?? Math.floor((2 ** 32 - 1) * Math.random() - upperBoundSeedValue); @@ -1064,7 +1069,7 @@ async function normalize( ) { throw new (_jestValidate().ValidationError)( 'Validation Error', - `seed value must be between \`-0x80000000\` and \`0x7fffffff\` inclusive - is ${newOptions.seed}` + `seed value must be between \`-0x80000000\` and \`0x7fffffff\` inclusive - instead it is ${newOptions.seed}` ); } if (!newOptions.onlyChanged) { diff --git a/node_modules/jest-config/build/parseShardPair.js b/node_modules/jest-config/build/parseShardPair.js index 443c7e830..f45d2dcaf 100644 --- a/node_modules/jest-config/build/parseShardPair.js +++ b/node_modules/jest-config/build/parseShardPair.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.parseShardPair = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/readConfigFileAndSetRootDir.js b/node_modules/jest-config/build/readConfigFileAndSetRootDir.js index 97a88bc66..6e62a4d50 100644 --- a/node_modules/jest-config/build/readConfigFileAndSetRootDir.js +++ b/node_modules/jest-config/build/readConfigFileAndSetRootDir.js @@ -84,7 +84,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/resolveConfigPath.js b/node_modules/jest-config/build/resolveConfigPath.js index a1c5e9240..7dd8e02b4 100644 --- a/node_modules/jest-config/build/resolveConfigPath.js +++ b/node_modules/jest-config/build/resolveConfigPath.js @@ -85,7 +85,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/setFromArgv.js b/node_modules/jest-config/build/setFromArgv.js index 9e6fa0205..9f5c16271 100644 --- a/node_modules/jest-config/build/setFromArgv.js +++ b/node_modules/jest-config/build/setFromArgv.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = setFromArgv; var _utils = require('./utils'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -14,41 +14,42 @@ var _utils = require('./utils'); const specialArgs = ['_', '$0', 'h', 'help', 'config']; function setFromArgv(options, argv) { - const argvToOptions = Object.keys(argv) - .filter(key => argv[key] !== undefined && specialArgs.indexOf(key) === -1) - .reduce((options, key) => { - switch (key) { - case 'coverage': - options.collectCoverage = argv[key]; - break; - case 'json': - options.useStderr = argv[key]; - break; - case 'watchAll': - options.watch = false; - options.watchAll = argv[key]; - break; - case 'env': - options.testEnvironment = argv[key]; - break; - case 'config': - break; - case 'coverageThreshold': - case 'globals': - case 'haste': - case 'moduleNameMapper': - case 'testEnvironmentOptions': - case 'transform': - const str = argv[key]; - if ((0, _utils.isJSONString)(str)) { - options[key] = JSON.parse(str); - } - break; - default: - options[key] = argv[key]; - } + const argvToOptions = Object.keys(argv).reduce((options, key) => { + if (argv[key] === undefined || specialArgs.includes(key)) { return options; - }, {}); + } + switch (key) { + case 'coverage': + options.collectCoverage = argv[key]; + break; + case 'json': + options.useStderr = argv[key]; + break; + case 'watchAll': + options.watch = false; + options.watchAll = argv[key]; + break; + case 'env': + options.testEnvironment = argv[key]; + break; + case 'config': + break; + case 'coverageThreshold': + case 'globals': + case 'haste': + case 'moduleNameMapper': + case 'testEnvironmentOptions': + case 'transform': + const str = argv[key]; + if ((0, _utils.isJSONString)(str)) { + options[key] = JSON.parse(str); + } + break; + default: + options[key] = argv[key]; + } + return options; + }, {}); return { ...options, ...((0, _utils.isJSONString)(argv.config) ? JSON.parse(argv.config) : null), diff --git a/node_modules/jest-config/build/stringToBytes.js b/node_modules/jest-config/build/stringToBytes.js index 99b4f4798..a939fac15 100644 --- a/node_modules/jest-config/build/stringToBytes.js +++ b/node_modules/jest-config/build/stringToBytes.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/utils.js b/node_modules/jest-config/build/utils.js index 36bba2e25..16f6d2250 100644 --- a/node_modules/jest-config/build/utils.js +++ b/node_modules/jest-config/build/utils.js @@ -83,7 +83,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/build/validatePattern.js b/node_modules/jest-config/build/validatePattern.js index c3b0e7d6b..2493833c0 100644 --- a/node_modules/jest-config/build/validatePattern.js +++ b/node_modules/jest-config/build/validatePattern.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = validatePattern; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-config/package.json b/node_modules/jest-config/package.json index 275d3721d..1ca623652 100644 --- a/node_modules/jest-config/package.json +++ b/node_modules/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -30,25 +30,25 @@ }, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.4.1", - "@jest/types": "^29.4.1", - "babel-jest": "^29.4.1", + "@jest/test-sequencer": "^29.5.0", + "@jest/types": "^29.5.0", + "babel-jest": "^29.5.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.4.1", - "jest-environment-node": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-circus": "^29.5.0", + "jest-environment-node": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -67,5 +67,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-diff/LICENSE b/node_modules/jest-diff/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-diff/LICENSE +++ b/node_modules/jest-diff/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-diff/build/constants.js b/node_modules/jest-diff/build/constants.js index e6741c81d..ed4f92760 100644 --- a/node_modules/jest-diff/build/constants.js +++ b/node_modules/jest-diff/build/constants.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.SIMILAR_MESSAGE = exports.NO_DIFF_MESSAGE = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/diffLines.js b/node_modules/jest-diff/build/diffLines.js index d18b96050..c4632c6d9 100644 --- a/node_modules/jest-diff/build/diffLines.js +++ b/node_modules/jest-diff/build/diffLines.js @@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/diffStrings.js b/node_modules/jest-diff/build/diffStrings.js index 0a6af5c38..e11c5a52f 100644 --- a/node_modules/jest-diff/build/diffStrings.js +++ b/node_modules/jest-diff/build/diffStrings.js @@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/getAlignedDiffs.js b/node_modules/jest-diff/build/getAlignedDiffs.js index a0901345d..04da5471d 100644 --- a/node_modules/jest-diff/build/getAlignedDiffs.js +++ b/node_modules/jest-diff/build/getAlignedDiffs.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = void 0; var _cleanupSemantic = require('./cleanupSemantic'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/index.d.ts b/node_modules/jest-diff/build/index.d.ts index 79bcffcd2..f84a803c2 100644 --- a/node_modules/jest-diff/build/index.d.ts +++ b/node_modules/jest-diff/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/joinAlignedDiffs.js b/node_modules/jest-diff/build/joinAlignedDiffs.js index c143b9f91..af5eb53cd 100644 --- a/node_modules/jest-diff/build/joinAlignedDiffs.js +++ b/node_modules/jest-diff/build/joinAlignedDiffs.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.joinAlignedDiffsNoExpand = exports.joinAlignedDiffsExpand = void 0; var _cleanupSemantic = require('./cleanupSemantic'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/normalizeDiffOptions.js b/node_modules/jest-diff/build/normalizeDiffOptions.js index 52c38d259..c8eaeb98e 100644 --- a/node_modules/jest-diff/build/normalizeDiffOptions.js +++ b/node_modules/jest-diff/build/normalizeDiffOptions.js @@ -9,7 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/build/printDiffs.js b/node_modules/jest-diff/build/printDiffs.js index 9d7874c47..2b8f27ed3 100644 --- a/node_modules/jest-diff/build/printDiffs.js +++ b/node_modules/jest-diff/build/printDiffs.js @@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-diff/package.json b/node_modules/jest-diff/package.json index 333b30fe0..bf4af6e75 100644 --- a/node_modules/jest-diff/package.json +++ b/node_modules/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,12 +18,12 @@ }, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.3.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "devDependencies": { - "@jest/test-utils": "^29.4.1", + "@jest/test-utils": "^29.5.0", "strip-ansi": "^6.0.0" }, "engines": { @@ -32,5 +32,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-docblock/LICENSE b/node_modules/jest-docblock/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-docblock/LICENSE +++ b/node_modules/jest-docblock/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-docblock/build/index.d.ts b/node_modules/jest-docblock/build/index.d.ts index 3c25df59d..b4e72f5a8 100644 --- a/node_modules/jest-docblock/build/index.d.ts +++ b/node_modules/jest-docblock/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-docblock/build/index.js b/node_modules/jest-docblock/build/index.js index 9c0d82f5d..44f6dc326 100644 --- a/node_modules/jest-docblock/build/index.js +++ b/node_modules/jest-docblock/build/index.js @@ -26,7 +26,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-docblock/package.json b/node_modules/jest-docblock/package.json index c1e60b875..aad880d3d 100644 --- a/node_modules/jest-docblock/package.json +++ b/node_modules/jest-docblock/package.json @@ -1,6 +1,6 @@ { "name": "jest-docblock", - "version": "29.2.0", + "version": "29.4.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -28,5 +28,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "ee5b37a4f4433afcfffb0356cea47739d8092287" + "gitHead": "a49c88610e49a3242576160740a32a2fe11161e1" } diff --git a/node_modules/jest-each/LICENSE b/node_modules/jest-each/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-each/LICENSE +++ b/node_modules/jest-each/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-each/build/bind.js b/node_modules/jest-each/build/bind.js index cba03987a..68e049478 100644 --- a/node_modules/jest-each/build/bind.js +++ b/node_modules/jest-each/build/bind.js @@ -18,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-each/build/index.d.ts b/node_modules/jest-each/build/index.d.ts index 242ccc924..86ca927b2 100644 --- a/node_modules/jest-each/build/index.d.ts +++ b/node_modules/jest-each/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-each/build/index.js b/node_modules/jest-each/build/index.js index bde220278..56de956d1 100644 --- a/node_modules/jest-each/build/index.js +++ b/node_modules/jest-each/build/index.js @@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-each/build/table/array.js b/node_modules/jest-each/build/table/array.js index cf7b91d13..a02515651 100644 --- a/node_modules/jest-each/build/table/array.js +++ b/node_modules/jest-each/build/table/array.js @@ -60,7 +60,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-each/build/table/interpolation.js b/node_modules/jest-each/build/table/interpolation.js index e7fb5c055..acf630708 100644 --- a/node_modules/jest-each/build/table/interpolation.js +++ b/node_modules/jest-each/build/table/interpolation.js @@ -20,7 +20,7 @@ function _prettyFormat() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -28,30 +28,24 @@ function _prettyFormat() { */ const interpolateVariables = (title, template, index) => - Object.keys(template) - .reduce(getMatchingKeyPaths(title), []) // aka flatMap - .reduce(replaceKeyPathWithValue(template), title) + title + .replace( + new RegExp(`\\$(${Object.keys(template).join('|')})[.\\w]*`, 'g'), + match => { + const keyPath = match.slice(1).split('.'); + const value = getPath(template, keyPath); + return (0, _jestGetType().isPrimitive)(value) + ? String(value) + : (0, _prettyFormat().format)(value, { + maxDepth: 1, + min: true + }); + } + ) .replace('$#', `${index}`); -exports.interpolateVariables = interpolateVariables; -const getMatchingKeyPaths = title => (matches, key) => - matches.concat(title.match(new RegExp(`\\$${key}[\\.\\w]*`, 'g')) || []); -const replaceKeyPathWithValue = template => (title, match) => { - const keyPath = match.replace('$', '').split('.'); - const value = getPath(template, keyPath); - if ((0, _jestGetType().isPrimitive)(value)) { - return title.replace(match, String(value)); - } - return title.replace( - match, - (0, _prettyFormat().format)(value, { - maxDepth: 1, - min: true - }) - ); -}; /* eslint import/export: 0*/ - +exports.interpolateVariables = interpolateVariables; function getPath(template, [head, ...tail]) { if (!head || !Object.prototype.hasOwnProperty.call(template, head)) return template; diff --git a/node_modules/jest-each/build/table/template.js b/node_modules/jest-each/build/table/template.js index 4eb667bef..c24a46593 100644 --- a/node_modules/jest-each/build/table/template.js +++ b/node_modules/jest-each/build/table/template.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = template; var _interpolation = require('./interpolation'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-each/build/validation.js b/node_modules/jest-each/build/validation.js index dd065e1c1..9f421dbc0 100644 --- a/node_modules/jest-each/build/validation.js +++ b/node_modules/jest-each/build/validation.js @@ -25,7 +25,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-each/package.json b/node_modules/jest-each/package.json index 7e2eee8f2..f8a9be721 100644 --- a/node_modules/jest-each/package.json +++ b/node_modules/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "29.4.1", + "version": "29.5.0", "description": "Parameterised tests for Jest", "main": "./build/index.js", "types": "./build/index.d.ts", @@ -25,11 +25,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.4.1", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "jest-util": "^29.5.0", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -37,5 +37,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-environment-node/LICENSE b/node_modules/jest-environment-node/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-environment-node/LICENSE +++ b/node_modules/jest-environment-node/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-environment-node/build/index.d.ts b/node_modules/jest-environment-node/build/index.d.ts index 8dde21c2d..f8f2392ef 100644 --- a/node_modules/jest-environment-node/build/index.d.ts +++ b/node_modules/jest-environment-node/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-environment-node/build/index.js b/node_modules/jest-environment-node/build/index.js index e2662bf8c..a9d8c2fbc 100644 --- a/node_modules/jest-environment-node/build/index.js +++ b/node_modules/jest-environment-node/build/index.js @@ -33,7 +33,7 @@ function _jestUtil() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-environment-node/package.json b/node_modules/jest-environment-node/package.json index dc0bd728b..aa71b94a1 100644 --- a/node_modules/jest-environment-node/package.json +++ b/node_modules/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,15 +17,15 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" }, "devDependencies": { - "@jest/test-utils": "^29.4.1" + "@jest/test-utils": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -33,5 +33,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-get-type/LICENSE b/node_modules/jest-get-type/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-get-type/LICENSE +++ b/node_modules/jest-get-type/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-get-type/build/index.d.ts b/node_modules/jest-get-type/build/index.d.ts index 096d2d1ea..20931392d 100644 --- a/node_modules/jest-get-type/build/index.d.ts +++ b/node_modules/jest-get-type/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-get-type/build/index.js b/node_modules/jest-get-type/build/index.js index b8fb922d7..3368978ef 100644 --- a/node_modules/jest-get-type/build/index.js +++ b/node_modules/jest-get-type/build/index.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.getType = getType; exports.isPrimitive = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-get-type/package.json b/node_modules/jest-get-type/package.json index 2443eab2f..2ccae40c8 100644 --- a/node_modules/jest-get-type/package.json +++ b/node_modules/jest-get-type/package.json @@ -1,7 +1,7 @@ { "name": "jest-get-type", "description": "A utility function to get the type of a value", - "version": "29.2.0", + "version": "29.4.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -23,5 +23,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "ee5b37a4f4433afcfffb0356cea47739d8092287" + "gitHead": "a49c88610e49a3242576160740a32a2fe11161e1" } diff --git a/node_modules/jest-haste-map/LICENSE b/node_modules/jest-haste-map/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-haste-map/LICENSE +++ b/node_modules/jest-haste-map/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-haste-map/build/HasteFS.js b/node_modules/jest-haste-map/build/HasteFS.js index 013548389..09384ba52 100644 --- a/node_modules/jest-haste-map/build/HasteFS.js +++ b/node_modules/jest-haste-map/build/HasteFS.js @@ -57,7 +57,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/ModuleMap.js b/node_modules/jest-haste-map/build/ModuleMap.js index 207878b8a..5ddd1fd8c 100644 --- a/node_modules/jest-haste-map/build/ModuleMap.js +++ b/node_modules/jest-haste-map/build/ModuleMap.js @@ -50,7 +50,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/blacklist.js b/node_modules/jest-haste-map/build/blacklist.js index 3595fcaa9..ae90b1a75 100644 --- a/node_modules/jest-haste-map/build/blacklist.js +++ b/node_modules/jest-haste-map/build/blacklist.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/constants.js b/node_modules/jest-haste-map/build/constants.js index 7fdbc96a1..1b8804ec3 100644 --- a/node_modules/jest-haste-map/build/constants.js +++ b/node_modules/jest-haste-map/build/constants.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/crawlers/node.js b/node_modules/jest-haste-map/build/crawlers/node.js index 3ef6ee2ff..1b0c2c149 100644 --- a/node_modules/jest-haste-map/build/crawlers/node.js +++ b/node_modules/jest-haste-map/build/crawlers/node.js @@ -71,7 +71,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/crawlers/watchman.js b/node_modules/jest-haste-map/build/crawlers/watchman.js index c69b4ca55..3b2fbfffa 100644 --- a/node_modules/jest-haste-map/build/crawlers/watchman.js +++ b/node_modules/jest-haste-map/build/crawlers/watchman.js @@ -67,7 +67,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/getMockName.js b/node_modules/jest-haste-map/build/getMockName.js index 328763d59..445e0b27c 100644 --- a/node_modules/jest-haste-map/build/getMockName.js +++ b/node_modules/jest-haste-map/build/getMockName.js @@ -52,7 +52,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/index.d.ts b/node_modules/jest-haste-map/build/index.d.ts index c30e5de6f..a0466fe85 100644 --- a/node_modules/jest-haste-map/build/index.d.ts +++ b/node_modules/jest-haste-map/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -220,6 +220,7 @@ declare type Options = { throwOnModuleCollision?: boolean; useWatchman?: boolean; watch?: boolean; + workerThreads?: boolean; }; declare type RawModuleMap = { diff --git a/node_modules/jest-haste-map/build/index.js b/node_modules/jest-haste-map/build/index.js index 1cc05b56e..15c71c68e 100644 --- a/node_modules/jest-haste-map/build/index.js +++ b/node_modules/jest-haste-map/build/index.js @@ -133,7 +133,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -289,7 +289,8 @@ class HasteMap extends _events().EventEmitter { skipPackageJson: !!options.skipPackageJson, throwOnModuleCollision: !!options.throwOnModuleCollision, useWatchman: options.useWatchman ?? true, - watch: !!options.watch + watch: !!options.watch, + workerThreads: options.workerThreads }; this._console = options.console || globalThis.console; if (options.ignorePattern) { @@ -737,6 +738,7 @@ class HasteMap extends _events().EventEmitter { }; } else { this._worker = new (_jestWorker().Worker)(require.resolve('./worker'), { + enableWorkerThreads: this._options.workerThreads, exposedMethods: ['getSha1', 'worker'], forkOptions: { serialization: 'json' diff --git a/node_modules/jest-haste-map/build/lib/dependencyExtractor.js b/node_modules/jest-haste-map/build/lib/dependencyExtractor.js index 10f752c00..9a2a14f85 100644 --- a/node_modules/jest-haste-map/build/lib/dependencyExtractor.js +++ b/node_modules/jest-haste-map/build/lib/dependencyExtractor.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.extractor = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/lib/fast_path.js b/node_modules/jest-haste-map/build/lib/fast_path.js index 0a9346067..f82787ccb 100644 --- a/node_modules/jest-haste-map/build/lib/fast_path.js +++ b/node_modules/jest-haste-map/build/lib/fast_path.js @@ -53,7 +53,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/lib/getPlatformExtension.js b/node_modules/jest-haste-map/build/lib/getPlatformExtension.js index fea58e23c..2e1d2045e 100644 --- a/node_modules/jest-haste-map/build/lib/getPlatformExtension.js +++ b/node_modules/jest-haste-map/build/lib/getPlatformExtension.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = getPlatformExtension; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/lib/isWatchmanInstalled.js b/node_modules/jest-haste-map/build/lib/isWatchmanInstalled.js index d21e573cf..b04abb24e 100644 --- a/node_modules/jest-haste-map/build/lib/isWatchmanInstalled.js +++ b/node_modules/jest-haste-map/build/lib/isWatchmanInstalled.js @@ -19,7 +19,7 @@ function _util() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/lib/normalizePathSep.js b/node_modules/jest-haste-map/build/lib/normalizePathSep.js index b67f91cd5..ad8cd1fe4 100644 --- a/node_modules/jest-haste-map/build/lib/normalizePathSep.js +++ b/node_modules/jest-haste-map/build/lib/normalizePathSep.js @@ -52,7 +52,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/watchers/FSEventsWatcher.js b/node_modules/jest-haste-map/build/watchers/FSEventsWatcher.js index 2a741c11c..2273a6cbd 100644 --- a/node_modules/jest-haste-map/build/watchers/FSEventsWatcher.js +++ b/node_modules/jest-haste-map/build/watchers/FSEventsWatcher.js @@ -90,7 +90,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/watchers/WatchmanWatcher.js b/node_modules/jest-haste-map/build/watchers/WatchmanWatcher.js index 577157b39..7b341687f 100644 --- a/node_modules/jest-haste-map/build/watchers/WatchmanWatcher.js +++ b/node_modules/jest-haste-map/build/watchers/WatchmanWatcher.js @@ -85,7 +85,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/build/worker.js b/node_modules/jest-haste-map/build/worker.js index b7579a398..7f27df08d 100644 --- a/node_modules/jest-haste-map/build/worker.js +++ b/node_modules/jest-haste-map/build/worker.js @@ -80,7 +80,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-haste-map/package.json b/node_modules/jest-haste-map/package.json index d50ef274c..1c38441bc 100644 --- a/node_modules/jest-haste-map/package.json +++ b/node_modules/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,20 +17,19 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, "devDependencies": { - "@jest/test-utils": "^29.4.1", "@types/fb-watchman": "^2.0.0", "@types/micromatch": "^4.0.1", "slash": "^3.0.0" @@ -44,5 +43,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-leak-detector/LICENSE b/node_modules/jest-leak-detector/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-leak-detector/LICENSE +++ b/node_modules/jest-leak-detector/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-leak-detector/build/index.d.ts b/node_modules/jest-leak-detector/build/index.d.ts index 0c37a9d9c..53555839a 100644 --- a/node_modules/jest-leak-detector/build/index.d.ts +++ b/node_modules/jest-leak-detector/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-leak-detector/build/index.js b/node_modules/jest-leak-detector/build/index.js index d71a5c143..a8ccb1e30 100644 --- a/node_modules/jest-leak-detector/build/index.js +++ b/node_modules/jest-leak-detector/build/index.js @@ -40,7 +40,7 @@ function _prettyFormat() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-leak-detector/package.json b/node_modules/jest-leak-detector/package.json index c43313c21..c44d01050 100644 --- a/node_modules/jest-leak-detector/package.json +++ b/node_modules/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,8 +17,8 @@ "./package.json": "./package.json" }, "dependencies": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "devDependencies": { "@types/node": "*" @@ -29,5 +29,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-matcher-utils/LICENSE b/node_modules/jest-matcher-utils/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-matcher-utils/LICENSE +++ b/node_modules/jest-matcher-utils/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-matcher-utils/build/Replaceable.js b/node_modules/jest-matcher-utils/build/Replaceable.js index 8bbb4fc4d..f86596dc9 100644 --- a/node_modules/jest-matcher-utils/build/Replaceable.js +++ b/node_modules/jest-matcher-utils/build/Replaceable.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = void 0; var _jestGetType = require('jest-get-type'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js b/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js index e24c399c4..acffc172e 100644 --- a/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js +++ b/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = deepCyclicCopyReplaceable; var _prettyFormat = require('pretty-format'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-matcher-utils/build/index.d.ts b/node_modules/jest-matcher-utils/build/index.d.ts index b000d84f1..a84b60b10 100644 --- a/node_modules/jest-matcher-utils/build/index.d.ts +++ b/node_modules/jest-matcher-utils/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-matcher-utils/build/index.js b/node_modules/jest-matcher-utils/build/index.js index a7bea631d..413a55a32 100644 --- a/node_modules/jest-matcher-utils/build/index.js +++ b/node_modules/jest-matcher-utils/build/index.js @@ -39,7 +39,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-matcher-utils/package.json b/node_modules/jest-matcher-utils/package.json index a4e1c33ee..19d28bd6c 100644 --- a/node_modules/jest-matcher-utils/package.json +++ b/node_modules/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -22,16 +22,16 @@ }, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "devDependencies": { - "@jest/test-utils": "^29.4.1", + "@jest/test-utils": "^29.5.0", "@types/node": "*" }, "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-message-util/LICENSE b/node_modules/jest-message-util/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-message-util/LICENSE +++ b/node_modules/jest-message-util/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-message-util/build/index.d.ts b/node_modules/jest-message-util/build/index.d.ts index b069c556b..055917948 100644 --- a/node_modules/jest-message-util/build/index.d.ts +++ b/node_modules/jest-message-util/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -9,11 +9,12 @@ import type {StackData} from 'stack-utils'; import type {TestResult} from '@jest/types'; export declare const formatExecError: ( - error: Error | TestResult.SerializableError | string | undefined, + error: Error | TestResult.SerializableError | string | number | undefined, config: StackTraceConfig, options: StackTraceOptions, testPath?: string, reuseMessage?: boolean, + noTitle?: boolean, ) => string; export declare const formatPath: ( diff --git a/node_modules/jest-message-util/build/index.js b/node_modules/jest-message-util/build/index.js index e23efeeb5..9d8f714f7 100644 --- a/node_modules/jest-message-util/build/index.js +++ b/node_modules/jest-message-util/build/index.js @@ -14,6 +14,7 @@ exports.separateMessageFromStack = void 0; var path = _interopRequireWildcard(require('path')); var _url = require('url'); +var _util = require('util'); var _codeFrame = require('@babel/code-frame'); var _chalk = _interopRequireDefault(require('chalk')); var fs = _interopRequireWildcard(require('graceful-fs')); @@ -154,12 +155,21 @@ function warnAboutWrongTestEnvironment(error, env) { // ExecError is an error thrown outside of the test suite (not inside an `it` or // `before/after each` hooks). If it's thrown, none of the tests in the file // are executed. -const formatExecError = (error, config, options, testPath, reuseMessage) => { +const formatExecError = ( + error, + config, + options, + testPath, + reuseMessage, + noTitle +) => { if (!error || typeof error === 'number') { error = new Error(`Expected an Error, but "${String(error)}" was thrown`); error.stack = ''; } let message, stack; + let cause = ''; + const subErrors = []; if (typeof error === 'string' || !error) { error || (error = 'EMPTY ERROR'); message = ''; @@ -172,6 +182,47 @@ const formatExecError = (error, config, options, testPath, reuseMessage) => { : `thrown: ${(0, _prettyFormat.format)(error, { maxDepth: 3 })}`; + if ('cause' in error) { + const prefix = '\n\nCause:\n'; + if (typeof error.cause === 'string' || typeof error.cause === 'number') { + cause += `${prefix}${error.cause}`; + } else if ( + _util.types.isNativeError(error.cause) || + error.cause instanceof Error + ) { + /* `isNativeError` is used, because the error might come from another realm. + `instanceof Error` is used because `isNativeError` does return `false` for some + things that are `instanceof Error` like the errors provided in + [verror](https://www.npmjs.com/package/verror) or [axios](https://axios-http.com). + */ + const formatted = formatExecError( + error.cause, + config, + options, + testPath, + reuseMessage, + true + ); + cause += `${prefix}${formatted}`; + } + } + if ('errors' in error && Array.isArray(error.errors)) { + for (const subError of error.errors) { + subErrors.push( + formatExecError( + subError, + config, + options, + testPath, + reuseMessage, + true + ) + ); + } + } + } + if (cause !== '') { + cause = indentAllLines(cause); } const separated = separateMessageFromStack(stack || ''); stack = separated.stack; @@ -195,12 +246,19 @@ const formatExecError = (error, config, options, testPath, reuseMessage) => { })}`; } let messageToUse; - if (reuseMessage) { + if (reuseMessage || noTitle) { messageToUse = ` ${message.trim()}`; } else { messageToUse = `${EXEC_ERROR_MESSAGE}\n\n${message}`; } - return `${TITLE_INDENT + TITLE_BULLET + messageToUse + stack}\n`; + const title = noTitle ? '' : `${TITLE_INDENT + TITLE_BULLET}`; + const subErrorStr = + subErrors.length > 0 + ? indentAllLines( + `\n\nErrors contained in AggregateError:\n${subErrors.join('\n')}` + ) + : ''; + return `${title + messageToUse + stack + cause + subErrorStr}\n`; }; exports.formatExecError = formatExecError; const removeInternalStackEntries = (lines, options) => { @@ -320,11 +378,68 @@ const formatStackTrace = (stack, config, options, testPath) => { : `\n${stacktrace}`; }; exports.formatStackTrace = formatStackTrace; +function isErrorOrStackWithCause(errorOrStack) { + return ( + typeof errorOrStack !== 'string' && + 'cause' in errorOrStack && + (typeof errorOrStack.cause === 'string' || + _util.types.isNativeError(errorOrStack.cause) || + errorOrStack.cause instanceof Error) + ); +} +function formatErrorStack(errorOrStack, config, options, testPath) { + // The stack of new Error('message') contains both the message and the stack, + // thus we need to sanitize and clean it for proper display using separateMessageFromStack. + const sourceStack = + typeof errorOrStack === 'string' ? errorOrStack : errorOrStack.stack || ''; + let {message, stack} = separateMessageFromStack(sourceStack); + stack = options.noStackTrace + ? '' + : `${STACK_TRACE_COLOR( + formatStackTrace(stack, config, options, testPath) + )}\n`; + message = checkForCommonEnvironmentErrors(message); + message = indentAllLines(message); + let cause = ''; + if (isErrorOrStackWithCause(errorOrStack)) { + const nestedCause = formatErrorStack( + errorOrStack.cause, + config, + options, + testPath + ); + cause = `\n${MESSAGE_INDENT}Cause:\n${nestedCause}`; + } + return `${message}\n${stack}${cause}`; +} +function failureDetailsToErrorOrStack(failureDetails, content) { + if (!failureDetails) { + return content; + } + if ( + _util.types.isNativeError(failureDetails) || + failureDetails instanceof Error + ) { + return failureDetails; // receiving raw errors for jest-circus + } + + if ( + typeof failureDetails === 'object' && + 'error' in failureDetails && + (_util.types.isNativeError(failureDetails.error) || + failureDetails.error instanceof Error) + ) { + return failureDetails.error; // receiving instances of FailedAssertion for jest-jasmine + } + + return content; +} const formatResultsErrors = (testResults, config, options, testPath) => { const failedResults = testResults.reduce((errors, result) => { - result.failureMessages.forEach(item => { + result.failureMessages.forEach((item, index) => { errors.push({ - content: checkForCommonEnvironmentErrors(item), + content: item, + failureDetails: result.failureDetails[index], result }); }); @@ -334,14 +449,11 @@ const formatResultsErrors = (testResults, config, options, testPath) => { return null; } return failedResults - .map(({result, content}) => { - let {message, stack} = separateMessageFromStack(content); - stack = options.noStackTrace - ? '' - : `${STACK_TRACE_COLOR( - formatStackTrace(stack, config, options, testPath) - )}\n`; - message = indentAllLines(message); + .map(({result, content, failureDetails}) => { + const rootErrorOrStack = failureDetailsToErrorOrStack( + failureDetails, + content + ); const title = `${_chalk.default.bold.red( TITLE_INDENT + TITLE_BULLET + @@ -349,7 +461,12 @@ const formatResultsErrors = (testResults, config, options, testPath) => { (result.ancestorTitles.length ? ANCESTRY_SEPARATOR : '') + result.title )}\n`; - return `${title}\n${message}\n${stack}`; + return `${title}\n${formatErrorStack( + rootErrorOrStack, + config, + options, + testPath + )}`; }) .join('\n'); }; diff --git a/node_modules/jest-message-util/package.json b/node_modules/jest-message-util/package.json index e1c848a0c..7a9693ce2 100644 --- a/node_modules/jest-message-util/package.json +++ b/node_modules/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -21,22 +21,23 @@ }, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "devDependencies": { "@types/babel__code-frame": "^7.0.0", "@types/graceful-fs": "^4.1.3", - "@types/micromatch": "^4.0.1" + "@types/micromatch": "^4.0.1", + "tempy": "^1.0.0" }, "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-mock/LICENSE b/node_modules/jest-mock/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-mock/LICENSE +++ b/node_modules/jest-mock/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-mock/build/index.d.ts b/node_modules/jest-mock/build/index.d.ts index 9db6f3e5f..82b59a1e6 100644 --- a/node_modules/jest-mock/build/index.d.ts +++ b/node_modules/jest-mock/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -218,7 +218,6 @@ export declare class ModuleMocker { private _mockConfigRegistry; private _spyState; private _invocationCallCounter; - private _originalFn; /** * @see README.md * @param global Global object of the test environment, used to create @@ -259,6 +258,7 @@ export declare class ModuleMocker { ): fn is Mock<(...args: P) => R>; isMockFunction(fn: unknown): fn is Mock; fn(implementation?: T): Mock; + private _attachMockImplementation; spyOn< T extends object, K extends PropertyLikeKeys, diff --git a/node_modules/jest-mock/build/index.js b/node_modules/jest-mock/build/index.js index 6b77205a0..76894f31b 100644 --- a/node_modules/jest-mock/build/index.js +++ b/node_modules/jest-mock/build/index.js @@ -17,7 +17,7 @@ function _jestUtil() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -208,7 +208,6 @@ class ModuleMocker { _mockConfigRegistry; _spyState; _invocationCallCounter; - _originalFn; /** * @see README.md @@ -221,7 +220,6 @@ class ModuleMocker { this._mockConfigRegistry = new WeakMap(); this._spyState = new Set(); this._invocationCallCounter = 1; - this._originalFn = new WeakMap(); } _getSlots(object) { if (!object) { @@ -286,8 +284,7 @@ class ModuleMocker { return { mockImpl: undefined, mockName: 'jest.fn()', - specificMockImpls: [], - specificReturnValues: [] + specificMockImpls: [] }; } _defaultMockState() { @@ -299,7 +296,7 @@ class ModuleMocker { results: [] }; } - _makeComponent(metadata, restore) { + _makeComponent(metadata, spyState) { if (metadata.type === 'object') { return new this._environmentGlobal.Object(); } else if (metadata.type === 'array') { @@ -410,8 +407,8 @@ class ModuleMocker { const f = this._createMockFunction(metadata, mockConstructor); f._isMockFunction = true; f.getMockImplementation = () => this._ensureMockConfig(f).mockImpl; - if (typeof restore === 'function') { - this._spyState.add(restore); + if (spyState != null) { + this._spyState.add(spyState); } this._mockState.set(f, this._defaultMockState()); this._mockConfigRegistry.set(f, this._defaultMockConfig()); @@ -427,17 +424,19 @@ class ModuleMocker { }; f.mockReset = () => { f.mockClear(); - const originalFn = this._originalFn.get(f); - const originalMockImpl = { - ...this._defaultMockConfig(), - mockImpl: originalFn - }; - this._mockConfigRegistry.set(f, originalMockImpl); + this._mockConfigRegistry.delete(f); + if (spyState != null) { + spyState.reset?.(); + } return f; }; f.mockRestore = () => { - f.mockReset(); - return restore ? restore() : undefined; + f.mockClear(); + this._mockConfigRegistry.delete(f); + if (spyState != null) { + spyState.restore(); + this._spyState.delete(spyState); + } }; f.mockReturnValueOnce = value => // next function call will return this value or default return value @@ -473,14 +472,18 @@ class ModuleMocker { // Remember previous mock implementation, then set new one const mockConfig = this._ensureMockConfig(f); const previousImplementation = mockConfig.mockImpl; + const previousSpecificImplementations = mockConfig.specificMockImpls; mockConfig.mockImpl = fn; + mockConfig.specificMockImpls = []; const returnedValue = callback(); if ((0, _jestUtil().isPromise)(returnedValue)) { return returnedValue.then(() => { mockConfig.mockImpl = previousImplementation; + mockConfig.specificMockImpls = previousSpecificImplementations; }); } else { mockConfig.mockImpl = previousImplementation; + mockConfig.specificMockImpls = previousSpecificImplementations; } } f.mockImplementation = fn => { @@ -594,14 +597,14 @@ class ModuleMocker { * Check whether the given property of an object has been already replaced. */ _findReplacedProperty(object, propertyKey) { - for (const spyState of this._spyState) { + for (const {restore} of this._spyState) { if ( - 'object' in spyState && - 'property' in spyState && - spyState.object === object && - spyState.property === propertyKey + 'object' in restore && + 'property' in restore && + restore.object === object && + restore.property === propertyKey ) { - return spyState; + return restore; } } return; @@ -701,6 +704,11 @@ class ModuleMocker { } return fn; } + _attachMockImplementation(mock, original) { + mock.mockImplementation(function () { + return original.apply(this, arguments); + }); + } spyOn(object, methodKey, accessType) { if (typeof object !== 'object' && typeof object !== 'function') { throw new Error( @@ -752,9 +760,14 @@ class ModuleMocker { { type: 'function' }, - () => { - descriptor.get = originalGet; - Object.defineProperty(object, methodKey, descriptor); + { + reset: () => { + this._attachMockImplementation(mock, original); + }, + restore: () => { + descriptor.get = originalGet; + Object.defineProperty(object, methodKey, descriptor); + } } ); descriptor.get = () => mock; @@ -764,22 +777,24 @@ class ModuleMocker { { type: 'function' }, - () => { - if (isMethodOwner) { - object[methodKey] = original; - } else { - delete object[methodKey]; + { + reset: () => { + this._attachMockImplementation(mock, original); + }, + restore: () => { + if (isMethodOwner) { + object[methodKey] = original; + } else { + delete object[methodKey]; + } } } ); - // @ts-expect-error overriding original method with a Mock + // @ts-expect-error: overriding original method with a mock object[methodKey] = mock; } - mock.mockImplementation(function () { - return original.apply(this, arguments); - }); + this._attachMockImplementation(mock, original); } - this._originalFn.set(object[methodKey], original); return object[methodKey]; } _spyOnProperty(object, propertyKey, accessType) { @@ -823,16 +838,18 @@ class ModuleMocker { { type: 'function' }, - () => { - // @ts-expect-error: mock is assignable - descriptor[accessType] = original; - Object.defineProperty(object, propertyKey, descriptor); + { + reset: () => { + this._attachMockImplementation(descriptor[accessType], original); + }, + restore: () => { + // @ts-expect-error: overriding original method with a mock + descriptor[accessType] = original; + Object.defineProperty(object, propertyKey, descriptor); + } } ); - descriptor[accessType].mockImplementation(function () { - // @ts-expect-error - wrong context - return original.apply(this, arguments); - }); + this._attachMockImplementation(descriptor[accessType], original); } Object.defineProperty(object, propertyKey, descriptor); return descriptor[accessType]; @@ -917,25 +934,31 @@ class ModuleMocker { }, restore: () => { restore(); - this._spyState.delete(restore); + this._spyState.delete({ + restore + }); } }; restore.object = object; restore.property = propertyKey; restore.replaced = replaced; - this._spyState.add(restore); + this._spyState.add({ + restore + }); return replaced.replaceValue(value); } clearAllMocks() { this._mockState = new WeakMap(); } resetAllMocks() { - this._spyState.forEach(reset => reset()); + this.clearAllMocks(); this._mockConfigRegistry = new WeakMap(); - this._mockState = new WeakMap(); + this._spyState.forEach(spyState => spyState.reset?.()); } restoreAllMocks() { - this._spyState.forEach(restore => restore()); + this.clearAllMocks(); + this._mockConfigRegistry = new WeakMap(); + this._spyState.forEach(spyState => spyState.restore()); this._spyState = new Set(); } _typeOf(value) { diff --git a/node_modules/jest-mock/package.json b/node_modules/jest-mock/package.json index e4b11b394..3e323785d 100644 --- a/node_modules/jest-mock/package.json +++ b/node_modules/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,9 +17,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-util": "^29.4.1" + "jest-util": "^29.5.0" }, "devDependencies": { "@tsd/typescript": "^4.9.0", @@ -31,5 +31,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-regex-util/LICENSE b/node_modules/jest-regex-util/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-regex-util/LICENSE +++ b/node_modules/jest-regex-util/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-regex-util/build/index.d.ts b/node_modules/jest-regex-util/build/index.d.ts index 018afa6e6..8de708104 100644 --- a/node_modules/jest-regex-util/build/index.d.ts +++ b/node_modules/jest-regex-util/build/index.d.ts @@ -1,11 +1,11 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-regex-util/build/index.js b/node_modules/jest-regex-util/build/index.js index 976143ca9..0bb27016d 100644 --- a/node_modules/jest-regex-util/build/index.js +++ b/node_modules/jest-regex-util/build/index.js @@ -9,7 +9,7 @@ exports.replacePathSepForRegex = void 0; var _path = require('path'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-regex-util/package.json b/node_modules/jest-regex-util/package.json index 28f679914..67e78dbd2 100644 --- a/node_modules/jest-regex-util/package.json +++ b/node_modules/jest-regex-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-regex-util", - "version": "29.2.0", + "version": "29.4.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -25,5 +25,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "ee5b37a4f4433afcfffb0356cea47739d8092287" + "gitHead": "a49c88610e49a3242576160740a32a2fe11161e1" } diff --git a/node_modules/jest-resolve-dependencies/LICENSE b/node_modules/jest-resolve-dependencies/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-resolve-dependencies/LICENSE +++ b/node_modules/jest-resolve-dependencies/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-resolve-dependencies/build/index.d.ts b/node_modules/jest-resolve-dependencies/build/index.d.ts index fceba3fb6..267bfc618 100644 --- a/node_modules/jest-resolve-dependencies/build/index.d.ts +++ b/node_modules/jest-resolve-dependencies/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve-dependencies/build/index.js b/node_modules/jest-resolve-dependencies/build/index.js index b208ad7cf..9decff2c3 100644 --- a/node_modules/jest-resolve-dependencies/build/index.js +++ b/node_modules/jest-resolve-dependencies/build/index.js @@ -59,7 +59,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve-dependencies/package.json b/node_modules/jest-resolve-dependencies/package.json index ef82635e7..129928a3f 100644 --- a/node_modules/jest-resolve-dependencies/package.json +++ b/node_modules/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,15 +17,15 @@ "./package.json": "./package.json" }, "dependencies": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.4.1" + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.5.0" }, "devDependencies": { - "@jest/test-utils": "^29.4.1", - "@jest/types": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-resolve": "^29.4.1", - "jest-runtime": "^29.4.1" + "@jest/test-utils": "^29.5.0", + "@jest/types": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-resolve": "^29.5.0", + "jest-runtime": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -33,5 +33,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-resolve/LICENSE b/node_modules/jest-resolve/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-resolve/LICENSE +++ b/node_modules/jest-resolve/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-resolve/build/ModuleNotFoundError.js b/node_modules/jest-resolve/build/ModuleNotFoundError.js index 59b3f4adc..9a877787c 100644 --- a/node_modules/jest-resolve/build/ModuleNotFoundError.js +++ b/node_modules/jest-resolve/build/ModuleNotFoundError.js @@ -62,7 +62,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/defaultResolver.js b/node_modules/jest-resolve/build/defaultResolver.js index 8c4d348ae..d1a37175d 100644 --- a/node_modules/jest-resolve/build/defaultResolver.js +++ b/node_modules/jest-resolve/build/defaultResolver.js @@ -71,7 +71,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/fileWalkers.js b/node_modules/jest-resolve/build/fileWalkers.js index d84269127..7d7c291e3 100644 --- a/node_modules/jest-resolve/build/fileWalkers.js +++ b/node_modules/jest-resolve/build/fileWalkers.js @@ -71,7 +71,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/index.d.ts b/node_modules/jest-resolve/build/index.d.ts index 36870719d..6ec1e4433 100644 --- a/node_modules/jest-resolve/build/index.d.ts +++ b/node_modules/jest-resolve/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/index.js b/node_modules/jest-resolve/build/index.js index c95564005..9c0f7c858 100644 --- a/node_modules/jest-resolve/build/index.js +++ b/node_modules/jest-resolve/build/index.js @@ -22,7 +22,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/isBuiltinModule.js b/node_modules/jest-resolve/build/isBuiltinModule.js index e5da579b9..80001d111 100644 --- a/node_modules/jest-resolve/build/isBuiltinModule.js +++ b/node_modules/jest-resolve/build/isBuiltinModule.js @@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/nodeModulesPaths.js b/node_modules/jest-resolve/build/nodeModulesPaths.js index 9a194ec19..3f8380d99 100644 --- a/node_modules/jest-resolve/build/nodeModulesPaths.js +++ b/node_modules/jest-resolve/build/nodeModulesPaths.js @@ -60,7 +60,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/resolver.js b/node_modules/jest-resolve/build/resolver.js index d016585f9..35b107092 100644 --- a/node_modules/jest-resolve/build/resolver.js +++ b/node_modules/jest-resolve/build/resolver.js @@ -84,7 +84,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/shouldLoadAsEsm.js b/node_modules/jest-resolve/build/shouldLoadAsEsm.js index ce2efc4c2..c6b14187d 100644 --- a/node_modules/jest-resolve/build/shouldLoadAsEsm.js +++ b/node_modules/jest-resolve/build/shouldLoadAsEsm.js @@ -21,7 +21,7 @@ function _vm() { } var _fileWalkers = require('./fileWalkers'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/build/utils.js b/node_modules/jest-resolve/build/utils.js index 8a7fd0458..dce4e089a 100644 --- a/node_modules/jest-resolve/build/utils.js +++ b/node_modules/jest-resolve/build/utils.js @@ -74,7 +74,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-resolve/package.json b/node_modules/jest-resolve/package.json index b567c5bba..12f071b89 100644 --- a/node_modules/jest-resolve/package.json +++ b/node_modules/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,10 +19,10 @@ "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" @@ -40,5 +40,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-runner/LICENSE b/node_modules/jest-runner/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-runner/LICENSE +++ b/node_modules/jest-runner/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-runner/build/index.d.ts b/node_modules/jest-runner/build/index.d.ts index 561f0328d..2e46f4585 100644 --- a/node_modules/jest-runner/build/index.d.ts +++ b/node_modules/jest-runner/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-runner/build/index.js b/node_modules/jest-runner/build/index.js index de46543e6..65c0ed180 100644 --- a/node_modules/jest-runner/build/index.js +++ b/node_modules/jest-runner/build/index.js @@ -57,7 +57,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -121,6 +121,7 @@ class TestRunner extends _types.EmittingTestRunner { } } const worker = new (_jestWorker().Worker)(require.resolve('./testWorker'), { + enableWorkerThreads: this._globalConfig.workerThreads, exposedMethods: ['worker'], forkOptions: { serialization: 'json', diff --git a/node_modules/jest-runner/build/runTest.js b/node_modules/jest-runner/build/runTest.js index 9901f2f34..e3367c85c 100644 --- a/node_modules/jest-runner/build/runTest.js +++ b/node_modules/jest-runner/build/runTest.js @@ -118,7 +118,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-runner/build/testWorker.js b/node_modules/jest-runner/build/testWorker.js index 39292eab4..fe0363e91 100644 --- a/node_modules/jest-runner/build/testWorker.js +++ b/node_modules/jest-runner/build/testWorker.js @@ -45,7 +45,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-runner/build/types.js b/node_modules/jest-runner/build/types.js index 9134b1103..8306d5abb 100644 --- a/node_modules/jest-runner/build/types.js +++ b/node_modules/jest-runner/build/types.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.EmittingTestRunner = exports.CallbackTestRunner = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-runner/package.json b/node_modules/jest-runner/package.json index 00a4fcb6a..f793605e3 100644 --- a/node_modules/jest-runner/package.json +++ b/node_modules/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,34 +17,35 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/environment": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/environment": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-leak-detector": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-resolve": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-util": "^29.4.1", - "jest-watcher": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-leak-detector": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-resolve": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-util": "^29.5.0", + "jest-watcher": "^29.5.0", + "jest-worker": "^29.5.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, "devDependencies": { + "@jest/test-utils": "^29.5.0", "@tsd/typescript": "^4.9.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.3", "@types/source-map-support": "^0.5.0", - "jest-jasmine2": "^29.4.1", + "jest-jasmine2": "^29.5.0", "tsd-lite": "^0.6.0" }, "engines": { @@ -53,5 +54,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-runtime/LICENSE b/node_modules/jest-runtime/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-runtime/LICENSE +++ b/node_modules/jest-runtime/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-runtime/build/helpers.js b/node_modules/jest-runtime/build/helpers.js index 71e1561c2..1048868f8 100644 --- a/node_modules/jest-runtime/build/helpers.js +++ b/node_modules/jest-runtime/build/helpers.js @@ -72,7 +72,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-runtime/build/index.d.ts b/node_modules/jest-runtime/build/index.d.ts index ea24f1c2b..5bdf9fdf3 100644 --- a/node_modules/jest-runtime/build/index.d.ts +++ b/node_modules/jest-runtime/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -25,6 +25,7 @@ declare type HasteMapOptions = { resetCache: boolean; watch?: boolean; watchman: boolean; + workerThreads?: boolean; }; declare interface InternalModuleOptions @@ -116,8 +117,6 @@ declare class Runtime { static getCLIOptions(): never; unstable_shouldLoadAsEsm(modulePath: string): boolean; private loadEsmModule; - private validateImportAssertions; - private getModuleFormat; private resolveModule; private linkAndEvaluateModule; unstable_importModule( diff --git a/node_modules/jest-runtime/build/index.js b/node_modules/jest-runtime/build/index.js index d761e373e..0ba01789d 100644 --- a/node_modules/jest-runtime/build/index.js +++ b/node_modules/jest-runtime/build/index.js @@ -53,13 +53,6 @@ function fs() { }; return data; } -function _semver() { - const data = require('semver'); - _semver = function () { - return data; - }; - return data; -} function _slash() { const data = _interopRequireDefault(require('slash')); _slash = function () { @@ -168,17 +161,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ const esmIsAvailable = typeof _vm().SourceTextModule === 'function'; -const runtimeSupportsImportAssertions = (0, _semver().satisfies)( - process.versions.node, - '^16.12.0 || >=17.0.0' -); const dataURIRegex = /^data:(?text\/javascript|application\/json|application\/wasm)(?:;(?charset=utf-8|base64))?,(?.*)$/; const defaultTransformOptions = { @@ -230,21 +219,6 @@ const supportsNodeColonModulePrefixInRequire = (() => { return false; } })(); -const kImplicitAssertType = Symbol('kImplicitAssertType'); - -// copied from https://github.com/nodejs/node/blob/7dd458382580f68cf7d718d96c8f4d2d3fe8b9db/lib/internal/modules/esm/assert.js#L20-L32 -const formatTypeMap = { - // @ts-expect-error - copied - __proto__: null, - builtin: kImplicitAssertType, - commonjs: kImplicitAssertType, - json: 'json', - module: kImplicitAssertType, - wasm: kImplicitAssertType -}; -const supportedAssertionTypes = new Set( - Object.values(formatTypeMap).filter(type => type !== kImplicitAssertType) -); class Runtime { _cacheFS; _cacheFSBuffer = new Map(); @@ -435,7 +409,8 @@ class Runtime { roots: config.roots, throwOnModuleCollision: config.haste.throwOnModuleCollision, useWatchman: options?.watchman, - watch: options?.watch + watch: options?.watch, + workerThreads: options?.workerThreads }); } static createResolver(config, moduleMap) { @@ -468,10 +443,7 @@ class Runtime { ) ); } - async loadEsmModule(modulePath, query = '', importAssertions) { - if (runtimeSupportsImportAssertions) { - this.validateImportAssertions(modulePath, query, importAssertions); - } + async loadEsmModule(modulePath, query = '') { const cacheKey = modulePath + query; if (this._fileTransformsMutex.has(cacheKey)) { await this._fileTransformsMutex.get(cacheKey); @@ -500,8 +472,7 @@ class Runtime { const wasm = this._importWasmModule( this.readFileBuffer(modulePath), modulePath, - context, - importAssertions + context ); this._esmoduleRegistry.set(cacheKey, wasm); transformResolve(); @@ -539,11 +510,7 @@ class Runtime { module = new (_vm().SourceTextModule)(transformedCode, { context, identifier: modulePath, - importModuleDynamically: async ( - specifier, - referencingModule, - importAssertions - ) => { + importModuleDynamically: async (specifier, referencingModule) => { invariant( runtimeSupportsVmModules, 'You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules' @@ -551,8 +518,7 @@ class Runtime { const module = await this.resolveModule( specifier, referencingModule.identifier, - referencingModule.context, - importAssertions + referencingModule.context ); return this.linkAndEvaluateModule(module); }, @@ -585,75 +551,7 @@ class Runtime { ); return module; } - validateImportAssertions( - modulePath, - query, - importAssertions = { - // @ts-expect-error - copy https://github.com/nodejs/node/blob/7dd458382580f68cf7d718d96c8f4d2d3fe8b9db/lib/internal/modules/esm/assert.js#LL55C50-L55C65 - __proto__: null - } - ) { - const format = this.getModuleFormat(modulePath); - const validType = formatTypeMap[format]; - const url = (0, _url().pathToFileURL)(modulePath); - if (query) { - url.search = query; - } - const urlString = url.href; - const assertionType = importAssertions.type; - switch (validType) { - case undefined: - // Ignore assertions for module formats we don't recognize, to allow new - // formats in the future. - return; - case kImplicitAssertType: - // This format doesn't allow an import assertion type, so the property - // must not be set on the import assertions object. - if (Object.prototype.hasOwnProperty.call(importAssertions, 'type')) { - handleInvalidAssertionType(urlString, assertionType); - } - return; - case assertionType: - // The asserted type is the valid type for this format. - return; - default: - // There is an expected type for this format, but the value of - // `importAssertions.type` might not have been it. - if (!Object.prototype.hasOwnProperty.call(importAssertions, 'type')) { - // `type` wasn't specified at all. - const error = new Error( - `Module "${urlString}" needs an import assertion of type "json"` - ); - error.code = 'ERR_IMPORT_ASSERTION_TYPE_MISSING'; - throw error; - } - handleInvalidAssertionType(urlString, assertionType); - } - } - getModuleFormat(modulePath) { - if (this._resolver.isCoreModule(modulePath)) { - return 'builtin'; - } - if (isWasm(modulePath)) { - return 'wasm'; - } - const fileExtension = path().extname(modulePath); - if (fileExtension === '.json') { - return 'json'; - } - if (this.unstable_shouldLoadAsEsm(modulePath)) { - return 'module'; - } - - // any unknown format should be treated as JS - return 'commonjs'; - } - async resolveModule( - specifier, - referencingIdentifier, - context, - importAssertions = {} - ) { + async resolveModule(specifier, referencingIdentifier, context) { if (this.isTornDown) { this._logFormattedReferenceError( 'You are trying to `import` a file after the Jest environment has been torn down.' @@ -702,8 +600,7 @@ class Runtime { module = await this._importWasmModule( Buffer.from(match.groups.code, 'base64'), specifier, - context, - importAssertions + context ); } else { let code = match.groups.code; @@ -731,11 +628,7 @@ class Runtime { module = new (_vm().SourceTextModule)(code, { context, identifier: specifier, - importModuleDynamically: async ( - specifier, - referencingModule, - importAssertions - ) => { + importModuleDynamically: async (specifier, referencingModule) => { invariant( runtimeSupportsVmModules, 'You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules' @@ -743,8 +636,7 @@ class Runtime { const module = await this.resolveModule( specifier, referencingModule.identifier, - referencingModule.context, - importAssertions + referencingModule.context ); return this.linkAndEvaluateModule(module); }, @@ -773,12 +665,12 @@ class Runtime { } const resolved = await this._resolveModule(referencingIdentifier, path); if ( - this._resolver.isCoreModule(resolved) || - this.unstable_shouldLoadAsEsm(resolved) || // json files are modules when imported in modules - resolved.endsWith('.json') + resolved.endsWith('.json') || + this._resolver.isCoreModule(resolved) || + this.unstable_shouldLoadAsEsm(resolved) ) { - return this.loadEsmModule(resolved, query, importAssertions); + return this.loadEsmModule(resolved, query); } return this.loadCjsAsEsm(referencingIdentifier, resolved, context); } @@ -795,12 +687,11 @@ class Runtime { // this method can await it this._esmModuleLinkingMap.set( module, - module.link((specifier, referencingModule, importCallOptions) => + module.link((specifier, referencingModule) => this.resolveModule( specifier, referencingModule.identifier, - referencingModule.context, - importCallOptions?.assert + referencingModule.context ) ) ); @@ -895,9 +786,16 @@ class Runtime { const {exports, reexports} = (0, _cjsModuleLexer().parse)(transformedCode); const namedExports = new Set(exports); reexports.forEach(reexport => { - const resolved = this._resolveCjsModule(modulePath, reexport); - const exports = this.getExportsOfCjs(resolved); - exports.forEach(namedExports.add, namedExports); + if (this._resolver.isCoreModule(reexport)) { + const exports = this.requireModule(modulePath, reexport); + if (exports !== null && typeof exports === 'object') { + Object.keys(exports).forEach(namedExports.add, namedExports); + } + } else { + const resolved = this._resolveCjsModule(modulePath, reexport); + const exports = this.getExportsOfCjs(resolved); + exports.forEach(namedExports.add, namedExports); + } }); this._cjsNamedExports.set(modulePath, namedExports); return namedExports; @@ -1278,11 +1176,11 @@ class Runtime { res => // TODO: will this work on windows? It might be better if `shouldInstrument` deals with it anyways res.url.startsWith(this._config.rootDir) && - this._v8CoverageSources.has(res.url) && (0, _transform().shouldInstrument)( res.url, this._coverageOptions, - this._config + this._config, + /* loadedFilenames */ Array.from(this._v8CoverageSources.keys()) ) ) .map(result => { @@ -1339,7 +1237,6 @@ class Runtime { } teardown() { this.restoreAllMocks(); - this.resetAllMocks(); this.resetModules(); this._internalModuleRegistry.clear(); this._mainModule = null; @@ -1599,11 +1496,7 @@ class Runtime { displayErrors: true, filename: scriptFilename, // @ts-expect-error: Experimental ESM API - importModuleDynamically: async ( - specifier, - _script, - importAssertions - ) => { + importModuleDynamically: async specifier => { invariant( runtimeSupportsVmModules, 'You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules' @@ -1613,8 +1506,7 @@ class Runtime { const module = await this.resolveModule( specifier, scriptFilename, - context, - importAssertions + context ); return this.linkAndEvaluateModule(module); } @@ -1656,7 +1548,7 @@ class Runtime { ); return evaluateSyntheticModule(module); } - async _importWasmModule(source, identifier, context, importAssertions) { + async _importWasmModule(source, identifier, context) { const wasmModule = await WebAssembly.compile(source); const exports = WebAssembly.Module.exports(wasmModule); const imports = WebAssembly.Module.imports(wasmModule); @@ -1666,8 +1558,7 @@ class Runtime { const resolvedModule = await this.resolveModule( module, identifier, - context, - importAssertions + context ); moduleLookup[module] = await this.linkAndEvaluateModule(resolvedModule); } @@ -2117,8 +2008,40 @@ class Runtime { const jestObject = { advanceTimersByTime: msToRun => _getFakeTimers().advanceTimersByTime(msToRun), + advanceTimersByTimeAsync: async msToRun => { + const fakeTimers = _getFakeTimers(); + if (fakeTimers === this._environment.fakeTimersModern) { + // TODO: remove this check in Jest 30 + if (typeof fakeTimers.advanceTimersByTimeAsync !== 'function') { + throw new TypeError( + 'Your test environment does not support async fake timers - please ensure its Jest dependencies are updated to version 29.5 or later' + ); + } + await fakeTimers.advanceTimersByTimeAsync(msToRun); + } else { + throw new TypeError( + '`jest.advanceTimersByTimeAsync()` is not available when using legacy fake timers.' + ); + } + }, advanceTimersToNextTimer: steps => _getFakeTimers().advanceTimersToNextTimer(steps), + advanceTimersToNextTimerAsync: async steps => { + const fakeTimers = _getFakeTimers(); + if (fakeTimers === this._environment.fakeTimersModern) { + // TODO: remove this check in Jest 30 + if (typeof fakeTimers.advanceTimersToNextTimerAsync !== 'function') { + throw new TypeError( + 'Your test environment does not support async fake timers - please ensure its Jest dependencies are updated to version 29.5 or later' + ); + } + await fakeTimers.advanceTimersToNextTimerAsync(steps); + } else { + throw new TypeError( + '`jest.advanceTimersToNextTimerAsync()` is not available when using legacy fake timers.' + ); + } + }, autoMockOff: disableAutomock, autoMockOn: enableAutomock, clearAllMocks, @@ -2177,7 +2100,39 @@ class Runtime { }, runAllTicks: () => _getFakeTimers().runAllTicks(), runAllTimers: () => _getFakeTimers().runAllTimers(), + runAllTimersAsync: async () => { + const fakeTimers = _getFakeTimers(); + if (fakeTimers === this._environment.fakeTimersModern) { + // TODO: remove this check in Jest 30 + if (typeof fakeTimers.runAllTimersAsync !== 'function') { + throw new TypeError( + 'Your test environment does not support async fake timers - please ensure its Jest dependencies are updated to version 29.5 or later' + ); + } + await fakeTimers.runAllTimersAsync(); + } else { + throw new TypeError( + '`jest.runAllTimersAsync()` is not available when using legacy fake timers.' + ); + } + }, runOnlyPendingTimers: () => _getFakeTimers().runOnlyPendingTimers(), + runOnlyPendingTimersAsync: async () => { + const fakeTimers = _getFakeTimers(); + if (fakeTimers === this._environment.fakeTimersModern) { + // TODO: remove this check in Jest 30 + if (typeof fakeTimers.runOnlyPendingTimersAsync !== 'function') { + throw new TypeError( + 'Your test environment does not support async fake timers - please ensure its Jest dependencies are updated to version 29.5 or later' + ); + } + await fakeTimers.runOnlyPendingTimersAsync(); + } else { + throw new TypeError( + '`jest.runOnlyPendingTimersAsync()` is not available when using legacy fake timers.' + ); + } + }, setMock: (moduleName, mock) => setMockFactory(moduleName, () => mock), setSystemTime: now => { const fakeTimers = _getFakeTimers(); @@ -2347,20 +2302,3 @@ async function evaluateSyntheticModule(module) { await module.evaluate(); return module; } -function handleInvalidAssertionType(url, type) { - if (typeof type !== 'string') { - throw new TypeError('Import assertion value must be a string'); - } - - // `type` might not have been one of the types we understand. - if (!supportedAssertionTypes.has(type)) { - const error = new Error(`Import assertion type "${type}" is unsupported`); - error.code = 'ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED'; - throw error; - } - - // `type` was the wrong value for this format. - const error = new Error(`Module "${url}" is not of type "${type}"`); - error.code = 'ERR_IMPORT_ASSERTION_TYPE_FAILED'; - throw error; -} diff --git a/node_modules/jest-runtime/node_modules/.bin/semver b/node_modules/jest-runtime/node_modules/.bin/semver deleted file mode 120000 index 5aaadf42c..000000000 --- a/node_modules/jest-runtime/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/jest-runtime/node_modules/lru-cache/LICENSE b/node_modules/jest-runtime/node_modules/lru-cache/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/jest-runtime/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/jest-runtime/node_modules/lru-cache/README.md b/node_modules/jest-runtime/node_modules/lru-cache/README.md deleted file mode 100644 index 435dfebb7..000000000 --- a/node_modules/jest-runtime/node_modules/lru-cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) - -## Installation: - -```javascript -npm install lru-cache --save -``` - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n, key) { return n * 2 + key.length } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = new LRU(options) - , otherCache = new LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -// non-string keys ARE fully supported -// but note that it must be THE SAME object, not -// just a JSON-equivalent object. -var someObject = { a: 1 } -cache.set(someObject, 'a value') -// Object keys are not toString()-ed -cache.set('[object Object]', 'a different value') -assert.equal(cache.get(someObject), 'a value') -// A similar object with same keys/values won't work, -// because it's a different object identity -assert.equal(cache.get({ a: 1 }), undefined) - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. Setting it to a non-number or negative number will - throw a `TypeError`. Setting it to 0 makes it be `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. - Setting this to a negative value will make everything seem old! - Setting it to a non-number will throw a `TypeError`. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n, key){return n.length}`. The default is - `function(){return 1}`, which is fine if you want to store `max` - like-sized things. The item is passed as the first argument, and - the key is passed as the second argumnet. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. -* `noDisposeOnSet` By default, if you set a `dispose()` method, then - it'll be called whenever a `set()` operation overwrites an existing - key. If you set this option, `dispose()` will only be called when a - key falls out of the cache, not when it is overwritten. -* `updateAgeOnGet` When using time-expiring entries with `maxAge`, - setting this to `true` will make each item's effective time update - to the current time whenever it is retrieved from cache, causing it - to not expire. (It can still fall out of cache based on recency of - use, of course.) - -## API - -* `set(key, value, maxAge)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. `maxAge` is optional and overrides the - cache `maxAge` option if provided. - - If the key is not found, `get()` will return `undefined`. - - The key and val can be any value. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `rforEach(function(value,key,cache), [thisp])` - - The same as `cache.forEach(...)` but items are iterated over in - reverse order. (ie, less recently used items are iterated over - first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. - -* `length` - - Return total length of objects in cache taking into account - `length` options function. - -* `itemCount` - - Return total quantity of objects currently in cache. Note, that - `stale` (see options) items are returned as part of this item - count. - -* `dump()` - - Return an array of the cache entries ready for serialization and usage - with 'destinationCache.load(arr)`. - -* `load(cacheEntriesArray)` - - Loads another cache entries array, obtained with `sourceCache.dump()`, - into the cache. The destination cache is reset before loading new entries - -* `prune()` - - Manually iterates over the entire cache proactively pruning old entries diff --git a/node_modules/jest-runtime/node_modules/lru-cache/index.js b/node_modules/jest-runtime/node_modules/lru-cache/index.js deleted file mode 100644 index 573b6b85b..000000000 --- a/node_modules/jest-runtime/node_modules/lru-cache/index.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict' - -// A linked list to keep track of recently-used-ness -const Yallist = require('yallist') - -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') - -const naiveLength = () => 1 - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity - - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } - - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } - - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } - - const node = this[CACHE].get(key) - const item = node.value - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } - - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - - const hit = new Entry(key, value, len, now, maxAge) - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) - - return false - } - - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)) - } - - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value - } -} - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} - -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) - - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) - } -} - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} - -module.exports = LRUCache diff --git a/node_modules/jest-runtime/node_modules/lru-cache/package.json b/node_modules/jest-runtime/node_modules/lru-cache/package.json deleted file mode 100644 index 43b7502c3..000000000 --- a/node_modules/jest-runtime/node_modules/lru-cache/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "6.0.0", - "author": "Isaac Z. Schlueter ", - "keywords": [ - "mru", - "lru", - "cache" - ], - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "main": "index.js", - "repository": "git://github.com/isaacs/node-lru-cache.git", - "devDependencies": { - "benchmark": "^2.1.4", - "tap": "^14.10.7" - }, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "files": [ - "index.js" - ], - "engines": { - "node": ">=10" - } -} diff --git a/node_modules/jest-runtime/node_modules/semver/LICENSE b/node_modules/jest-runtime/node_modules/semver/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/jest-runtime/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/jest-runtime/node_modules/semver/README.md b/node_modules/jest-runtime/node_modules/semver/README.md deleted file mode 100644 index df54e7a09..000000000 --- a/node_modules/jest-runtime/node_modules/semver/README.md +++ /dev/null @@ -1,568 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -You can also just load the module for the function that you care about, if -you'd like to minimize your footprint. - -```js -// load the whole API at once in a single object -const semver = require('semver') - -// or just load the bits you need -// all of them listed here, just pick and choose what you want - -// classes -const SemVer = require('semver/classes/semver') -const Comparator = require('semver/classes/comparator') -const Range = require('semver/classes/range') - -// functions for working with versions -const semverParse = require('semver/functions/parse') -const semverValid = require('semver/functions/valid') -const semverClean = require('semver/functions/clean') -const semverInc = require('semver/functions/inc') -const semverDiff = require('semver/functions/diff') -const semverMajor = require('semver/functions/major') -const semverMinor = require('semver/functions/minor') -const semverPatch = require('semver/functions/patch') -const semverPrerelease = require('semver/functions/prerelease') -const semverCompare = require('semver/functions/compare') -const semverRcompare = require('semver/functions/rcompare') -const semverCompareLoose = require('semver/functions/compare-loose') -const semverCompareBuild = require('semver/functions/compare-build') -const semverSort = require('semver/functions/sort') -const semverRsort = require('semver/functions/rsort') - -// low-level comparators between versions -const semverGt = require('semver/functions/gt') -const semverLt = require('semver/functions/lt') -const semverEq = require('semver/functions/eq') -const semverNeq = require('semver/functions/neq') -const semverGte = require('semver/functions/gte') -const semverLte = require('semver/functions/lte') -const semverCmp = require('semver/functions/cmp') -const semverCoerce = require('semver/functions/coerce') - -// working with ranges -const semverSatisfies = require('semver/functions/satisfies') -const semverMaxSatisfying = require('semver/ranges/max-satisfying') -const semverMinSatisfying = require('semver/ranges/min-satisfying') -const semverToComparators = require('semver/ranges/to-comparators') -const semverMinVersion = require('semver/ranges/min-version') -const semverValidRange = require('semver/ranges/valid') -const semverOutside = require('semver/ranges/outside') -const semverGtr = require('semver/ranges/gtr') -const semverLtr = require('semver/ranges/ltr') -const semverIntersects = require('semver/ranges/intersects') -const simplifyRange = require('semver/ranges/simplify') -const rangeSubset = require('semver/ranges/subset') -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless - `includePrerelease` is specified, in which case any version at all - satisfies) -* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero element in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0-0` -* `^0.2.3` := `>=0.2.3 <0.3.0-0` -* `^0.0.3` := `>=0.0.3 <0.0.4-0` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0-0` -* `^0.0.x` := `>=0.0.0 <0.1.0-0` -* `^0.0` := `>=0.0.0 <0.1.0-0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0-0` -* `^0.x` := `>=0.0.0 <1.0.0-0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions - are equal. Sorts in ascending order if passed to `Array.sort()`. - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect -* `simplifyRange(versions, range)`: Return a "simplified" range that - matches the same items in `versions` list as the range specified. Note - that it does *not* guarantee that it would match the same versions in all - cases, only for the set of versions provided. This is useful when - generating ranges by joining together multiple versions with `||` - programmatically, to provide the user with something a bit more - ergonomic. If the provided range is shorter in string-length than the - generated range, then that is returned. -* `subset(subRange, superRange)`: Return `true` if the `subRange` range is - entirely contained by the `superRange` range. - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version, options)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). - -If the `options.rtl` flag is set, then `coerce` will return the right-most -coercible tuple that does not share an ending index with a longer coercible -tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not -`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of -any other overlapping SemVer tuple. - -### Clean - -* `clean(version)`: Clean a string to be a valid semver if possible - -This will return a cleaned and trimmed semver version. If the provided -version is not valid a null will be returned. This does not work for -ranges. - -ex. -* `s.clean(' = v 2.1.5foo')`: `null` -* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean(' = v 2.1.5-foo')`: `null` -* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean('=v2.1.5')`: `'2.1.5'` -* `s.clean(' =v2.1.5')`: `2.1.5` -* `s.clean(' 2.1.5 ')`: `'2.1.5'` -* `s.clean('~1.0.0')`: `null` - -## Exported Modules - - - -You may pull in just the part of this semver utility that you need, if you -are sensitive to packing and tree-shaking concerns. The main -`require('semver')` export uses getter functions to lazily load the parts -of the API that are used. - -The following modules are available: - -* `require('semver')` -* `require('semver/classes')` -* `require('semver/classes/comparator')` -* `require('semver/classes/range')` -* `require('semver/classes/semver')` -* `require('semver/functions/clean')` -* `require('semver/functions/cmp')` -* `require('semver/functions/coerce')` -* `require('semver/functions/compare')` -* `require('semver/functions/compare-build')` -* `require('semver/functions/compare-loose')` -* `require('semver/functions/diff')` -* `require('semver/functions/eq')` -* `require('semver/functions/gt')` -* `require('semver/functions/gte')` -* `require('semver/functions/inc')` -* `require('semver/functions/lt')` -* `require('semver/functions/lte')` -* `require('semver/functions/major')` -* `require('semver/functions/minor')` -* `require('semver/functions/neq')` -* `require('semver/functions/parse')` -* `require('semver/functions/patch')` -* `require('semver/functions/prerelease')` -* `require('semver/functions/rcompare')` -* `require('semver/functions/rsort')` -* `require('semver/functions/satisfies')` -* `require('semver/functions/sort')` -* `require('semver/functions/valid')` -* `require('semver/ranges/gtr')` -* `require('semver/ranges/intersects')` -* `require('semver/ranges/ltr')` -* `require('semver/ranges/max-satisfying')` -* `require('semver/ranges/min-satisfying')` -* `require('semver/ranges/min-version')` -* `require('semver/ranges/outside')` -* `require('semver/ranges/to-comparators')` -* `require('semver/ranges/valid')` diff --git a/node_modules/jest-runtime/node_modules/semver/bin/semver.js b/node_modules/jest-runtime/node_modules/semver/bin/semver.js deleted file mode 100755 index 8d1b55720..000000000 --- a/node_modules/jest-runtime/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -const argv = process.argv.slice(2) - -let versions = [] - -const range = [] - -let inc = null - -const version = require('../package.json').version - -let loose = false - -let includePrerelease = false - -let coerce = false - -let rtl = false - -let identifier - -const semver = require('../') - -let reverse = false - -let options = {} - -const main = () => { - if (!argv.length) { - return help() - } - while (argv.length) { - let a = argv.shift() - const indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - const value = a.slice(indexOfEqualSign + 1) - a = a.slice(0, indexOfEqualSign) - argv.unshift(value) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } - - versions = versions.map((v) => { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter((v) => { - return semver.valid(v) - }) - if (!versions.length) { - return fail() - } - if (inc && (versions.length !== 1 || range.length)) { - return failInc() - } - - for (let i = 0, l = range.length; i < l; i++) { - versions = versions.filter((v) => { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) { - return fail() - } - } - return success(versions) -} - -const failInc = () => { - console.error('--inc can only be used on a single version with no range') - fail() -} - -const fail = () => process.exit(1) - -const success = () => { - const compare = reverse ? 'rcompare' : 'compare' - versions.sort((a, b) => { - return semver[compare](a, b, options) - }).map((v) => { - return semver.clean(v, options) - }).map((v) => { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach((v, i, _) => { - console.log(v) - }) -} - -const help = () => console.log( -`SemVer ${version} - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them.`) - -main() diff --git a/node_modules/jest-runtime/node_modules/semver/classes/comparator.js b/node_modules/jest-runtime/node_modules/semver/classes/comparator.js deleted file mode 100644 index 62cd204d9..000000000 --- a/node_modules/jest-runtime/node_modules/semver/classes/comparator.js +++ /dev/null @@ -1,136 +0,0 @@ -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false, - } - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - const sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - const sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - const sameSemVer = this.semver.version === comp.semver.version - const differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - const oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<') - const oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>') - - return ( - sameDirectionIncreasing || - sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || - oppositeDirectionsGreaterThan - ) - } -} - -module.exports = Comparator - -const parseOptions = require('../internal/parse-options') -const { re, t } = require('../internal/re') -const cmp = require('../functions/cmp') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const Range = require('./range') diff --git a/node_modules/jest-runtime/node_modules/semver/classes/index.js b/node_modules/jest-runtime/node_modules/semver/classes/index.js deleted file mode 100644 index 5e3f5c9b1..000000000 --- a/node_modules/jest-runtime/node_modules/semver/classes/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - SemVer: require('./semver.js'), - Range: require('./range.js'), - Comparator: require('./comparator.js'), -} diff --git a/node_modules/jest-runtime/node_modules/semver/classes/range.js b/node_modules/jest-runtime/node_modules/semver/classes/range.js deleted file mode 100644 index a791d9125..000000000 --- a/node_modules/jest-runtime/node_modules/semver/classes/range.js +++ /dev/null @@ -1,522 +0,0 @@ -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.format() - } - - format () { - this.range = this.set - .map((comps) => { - return comps.join(' ').trim() - }) - .join('||') - .trim() - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - range = range.trim() - - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = Object.keys(this.options).join(',') - const memoKey = `parseRange:${memoOpts}:${range}` - const cached = cache.get(memoKey) - if (cached) { - return cached - } - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} -module.exports = Range - -const LRU = require('lru-cache') -const cache = new LRU({ max: 1000 }) - -const parseOptions = require('../internal/parse-options') -const Comparator = require('./comparator') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const { - re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = require('../internal/re') - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => - comp.trim().split(/\s+/).map((c) => { - return replaceTilde(c, options) - }).join(' ') - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => - comp.trim().split(/\s+/).map((c) => { - return replaceCaret(c, options) - }).join(' ') - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map((c) => { - return replaceXRange(c, options) - }).join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') { - pr = '-0' - } - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp.trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return (`${from} ${to}`).trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} diff --git a/node_modules/jest-runtime/node_modules/semver/classes/semver.js b/node_modules/jest-runtime/node_modules/semver/classes/semver.js deleted file mode 100644 index af6295519..000000000 --- a/node_modules/jest-runtime/node_modules/semver/classes/semver.js +++ /dev/null @@ -1,287 +0,0 @@ -const debug = require('../internal/debug') -const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') -const { re, t } = require('../internal/re') - -const parseOptions = require('../internal/parse-options') -const { compareIdentifiers } = require('../internal/identifiers') -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid Version: ${version}`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.format() - this.raw = this.version - return this - } -} - -module.exports = SemVer diff --git a/node_modules/jest-runtime/node_modules/semver/functions/clean.js b/node_modules/jest-runtime/node_modules/semver/functions/clean.js deleted file mode 100644 index 811fe6b82..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/clean.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean diff --git a/node_modules/jest-runtime/node_modules/semver/functions/cmp.js b/node_modules/jest-runtime/node_modules/semver/functions/cmp.js deleted file mode 100644 index 401190947..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/cmp.js +++ /dev/null @@ -1,52 +0,0 @@ -const eq = require('./eq') -const neq = require('./neq') -const gt = require('./gt') -const gte = require('./gte') -const lt = require('./lt') -const lte = require('./lte') - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp diff --git a/node_modules/jest-runtime/node_modules/semver/functions/coerce.js b/node_modules/jest-runtime/node_modules/semver/functions/coerce.js deleted file mode 100644 index 2e01452fd..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/coerce.js +++ /dev/null @@ -1,52 +0,0 @@ -const SemVer = require('../classes/semver') -const parse = require('./parse') -const { re, t } = require('../internal/re') - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - let next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - - if (match === null) { - return null - } - - return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) -} -module.exports = coerce diff --git a/node_modules/jest-runtime/node_modules/semver/functions/compare-build.js b/node_modules/jest-runtime/node_modules/semver/functions/compare-build.js deleted file mode 100644 index 9eb881bef..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/compare-build.js +++ /dev/null @@ -1,7 +0,0 @@ -const SemVer = require('../classes/semver') -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild diff --git a/node_modules/jest-runtime/node_modules/semver/functions/compare-loose.js b/node_modules/jest-runtime/node_modules/semver/functions/compare-loose.js deleted file mode 100644 index 4881fbe00..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/compare-loose.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose diff --git a/node_modules/jest-runtime/node_modules/semver/functions/compare.js b/node_modules/jest-runtime/node_modules/semver/functions/compare.js deleted file mode 100644 index 748b7afa5..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/compare.js +++ /dev/null @@ -1,5 +0,0 @@ -const SemVer = require('../classes/semver') -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare diff --git a/node_modules/jest-runtime/node_modules/semver/functions/diff.js b/node_modules/jest-runtime/node_modules/semver/functions/diff.js deleted file mode 100644 index 87200ef3b..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/diff.js +++ /dev/null @@ -1,23 +0,0 @@ -const parse = require('./parse') -const eq = require('./eq') - -const diff = (version1, version2) => { - if (eq(version1, version2)) { - return null - } else { - const v1 = parse(version1) - const v2 = parse(version2) - const hasPre = v1.prerelease.length || v2.prerelease.length - const prefix = hasPre ? 'pre' : '' - const defaultResult = hasPre ? 'prerelease' : '' - for (const key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} -module.exports = diff diff --git a/node_modules/jest-runtime/node_modules/semver/functions/eq.js b/node_modules/jest-runtime/node_modules/semver/functions/eq.js deleted file mode 100644 index 271fed976..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/eq.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq diff --git a/node_modules/jest-runtime/node_modules/semver/functions/gt.js b/node_modules/jest-runtime/node_modules/semver/functions/gt.js deleted file mode 100644 index d9b2156d8..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/gt.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt diff --git a/node_modules/jest-runtime/node_modules/semver/functions/gte.js b/node_modules/jest-runtime/node_modules/semver/functions/gte.js deleted file mode 100644 index 5aeaa6347..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/gte.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte diff --git a/node_modules/jest-runtime/node_modules/semver/functions/inc.js b/node_modules/jest-runtime/node_modules/semver/functions/inc.js deleted file mode 100644 index 62d1da2c4..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/inc.js +++ /dev/null @@ -1,18 +0,0 @@ -const SemVer = require('../classes/semver') - -const inc = (version, release, options, identifier) => { - if (typeof (options) === 'string') { - identifier = options - options = undefined - } - - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier).version - } catch (er) { - return null - } -} -module.exports = inc diff --git a/node_modules/jest-runtime/node_modules/semver/functions/lt.js b/node_modules/jest-runtime/node_modules/semver/functions/lt.js deleted file mode 100644 index b440ab7d4..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/lt.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt diff --git a/node_modules/jest-runtime/node_modules/semver/functions/lte.js b/node_modules/jest-runtime/node_modules/semver/functions/lte.js deleted file mode 100644 index 6dcc95650..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/lte.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte diff --git a/node_modules/jest-runtime/node_modules/semver/functions/major.js b/node_modules/jest-runtime/node_modules/semver/functions/major.js deleted file mode 100644 index 4283165e9..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/major.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major diff --git a/node_modules/jest-runtime/node_modules/semver/functions/minor.js b/node_modules/jest-runtime/node_modules/semver/functions/minor.js deleted file mode 100644 index 57b3455f8..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/minor.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor diff --git a/node_modules/jest-runtime/node_modules/semver/functions/neq.js b/node_modules/jest-runtime/node_modules/semver/functions/neq.js deleted file mode 100644 index f944c0157..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/neq.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq diff --git a/node_modules/jest-runtime/node_modules/semver/functions/parse.js b/node_modules/jest-runtime/node_modules/semver/functions/parse.js deleted file mode 100644 index a66663aa5..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/parse.js +++ /dev/null @@ -1,33 +0,0 @@ -const { MAX_LENGTH } = require('../internal/constants') -const { re, t } = require('../internal/re') -const SemVer = require('../classes/semver') - -const parseOptions = require('../internal/parse-options') -const parse = (version, options) => { - options = parseOptions(options) - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - const r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -module.exports = parse diff --git a/node_modules/jest-runtime/node_modules/semver/functions/patch.js b/node_modules/jest-runtime/node_modules/semver/functions/patch.js deleted file mode 100644 index 63afca252..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/patch.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch diff --git a/node_modules/jest-runtime/node_modules/semver/functions/prerelease.js b/node_modules/jest-runtime/node_modules/semver/functions/prerelease.js deleted file mode 100644 index 06aa13248..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/prerelease.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease diff --git a/node_modules/jest-runtime/node_modules/semver/functions/rcompare.js b/node_modules/jest-runtime/node_modules/semver/functions/rcompare.js deleted file mode 100644 index 0ac509e79..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/rcompare.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare diff --git a/node_modules/jest-runtime/node_modules/semver/functions/rsort.js b/node_modules/jest-runtime/node_modules/semver/functions/rsort.js deleted file mode 100644 index 82404c5cf..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/rsort.js +++ /dev/null @@ -1,3 +0,0 @@ -const compareBuild = require('./compare-build') -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort diff --git a/node_modules/jest-runtime/node_modules/semver/functions/satisfies.js b/node_modules/jest-runtime/node_modules/semver/functions/satisfies.js deleted file mode 100644 index 50af1c199..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/satisfies.js +++ /dev/null @@ -1,10 +0,0 @@ -const Range = require('../classes/range') -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies diff --git a/node_modules/jest-runtime/node_modules/semver/functions/sort.js b/node_modules/jest-runtime/node_modules/semver/functions/sort.js deleted file mode 100644 index 4d10917ab..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/sort.js +++ /dev/null @@ -1,3 +0,0 @@ -const compareBuild = require('./compare-build') -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort diff --git a/node_modules/jest-runtime/node_modules/semver/functions/valid.js b/node_modules/jest-runtime/node_modules/semver/functions/valid.js deleted file mode 100644 index f27bae107..000000000 --- a/node_modules/jest-runtime/node_modules/semver/functions/valid.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid diff --git a/node_modules/jest-runtime/node_modules/semver/index.js b/node_modules/jest-runtime/node_modules/semver/index.js deleted file mode 100644 index 4a342c6af..000000000 --- a/node_modules/jest-runtime/node_modules/semver/index.js +++ /dev/null @@ -1,88 +0,0 @@ -// just pre-load all the stuff that index.js lazily exports -const internalRe = require('./internal/re') -const constants = require('./internal/constants') -const SemVer = require('./classes/semver') -const identifiers = require('./internal/identifiers') -const parse = require('./functions/parse') -const valid = require('./functions/valid') -const clean = require('./functions/clean') -const inc = require('./functions/inc') -const diff = require('./functions/diff') -const major = require('./functions/major') -const minor = require('./functions/minor') -const patch = require('./functions/patch') -const prerelease = require('./functions/prerelease') -const compare = require('./functions/compare') -const rcompare = require('./functions/rcompare') -const compareLoose = require('./functions/compare-loose') -const compareBuild = require('./functions/compare-build') -const sort = require('./functions/sort') -const rsort = require('./functions/rsort') -const gt = require('./functions/gt') -const lt = require('./functions/lt') -const eq = require('./functions/eq') -const neq = require('./functions/neq') -const gte = require('./functions/gte') -const lte = require('./functions/lte') -const cmp = require('./functions/cmp') -const coerce = require('./functions/coerce') -const Comparator = require('./classes/comparator') -const Range = require('./classes/range') -const satisfies = require('./functions/satisfies') -const toComparators = require('./ranges/to-comparators') -const maxSatisfying = require('./ranges/max-satisfying') -const minSatisfying = require('./ranges/min-satisfying') -const minVersion = require('./ranges/min-version') -const validRange = require('./ranges/valid') -const outside = require('./ranges/outside') -const gtr = require('./ranges/gtr') -const ltr = require('./ranges/ltr') -const intersects = require('./ranges/intersects') -const simplifyRange = require('./ranges/simplify') -const subset = require('./ranges/subset') -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} diff --git a/node_modules/jest-runtime/node_modules/semver/internal/constants.js b/node_modules/jest-runtime/node_modules/semver/internal/constants.js deleted file mode 100644 index 4f0de59b5..000000000 --- a/node_modules/jest-runtime/node_modules/semver/internal/constants.js +++ /dev/null @@ -1,17 +0,0 @@ -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -module.exports = { - SEMVER_SPEC_VERSION, - MAX_LENGTH, - MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH, -} diff --git a/node_modules/jest-runtime/node_modules/semver/internal/debug.js b/node_modules/jest-runtime/node_modules/semver/internal/debug.js deleted file mode 100644 index 1c00e1369..000000000 --- a/node_modules/jest-runtime/node_modules/semver/internal/debug.js +++ /dev/null @@ -1,9 +0,0 @@ -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug diff --git a/node_modules/jest-runtime/node_modules/semver/internal/identifiers.js b/node_modules/jest-runtime/node_modules/semver/internal/identifiers.js deleted file mode 100644 index e612d0a3d..000000000 --- a/node_modules/jest-runtime/node_modules/semver/internal/identifiers.js +++ /dev/null @@ -1,23 +0,0 @@ -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} diff --git a/node_modules/jest-runtime/node_modules/semver/internal/parse-options.js b/node_modules/jest-runtime/node_modules/semver/internal/parse-options.js deleted file mode 100644 index bbd9ec77a..000000000 --- a/node_modules/jest-runtime/node_modules/semver/internal/parse-options.js +++ /dev/null @@ -1,11 +0,0 @@ -// parse out just the options we care about so we always get a consistent -// obj with keys in a consistent order. -const opts = ['includePrerelease', 'loose', 'rtl'] -const parseOptions = options => - !options ? {} - : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((o, k) => { - o[k] = true - return o - }, {}) -module.exports = parseOptions diff --git a/node_modules/jest-runtime/node_modules/semver/internal/re.js b/node_modules/jest-runtime/node_modules/semver/internal/re.js deleted file mode 100644 index ed88398a9..000000000 --- a/node_modules/jest-runtime/node_modules/semver/internal/re.js +++ /dev/null @@ -1,182 +0,0 @@ -const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants') -const debug = require('./debug') -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 - -const createToken = (name, value, isGlobal) => { - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCE', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') diff --git a/node_modules/jest-runtime/node_modules/semver/package.json b/node_modules/jest-runtime/node_modules/semver/package.json deleted file mode 100644 index 72d3f66e8..000000000 --- a/node_modules/jest-runtime/node_modules/semver/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "semver", - "version": "7.3.8", - "description": "The semantic version parser used by npm.", - "main": "index.js", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.4.4", - "tap": "^16.0.0" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "https://github.com/npm/node-semver.git" - }, - "bin": { - "semver": "bin/semver.js" - }, - "files": [ - "bin/", - "lib/", - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "tap": { - "check-coverage": true, - "coverage-map": "map.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": ">=10" - }, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.4.4", - "engines": ">=10", - "content": "./scripts", - "ciVersions": [ - "10.0.0", - "10.x", - "12.x", - "14.x", - "16.x", - "18.x" - ], - "distPaths": [ - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "allowPaths": [ - "/classes/", - "/functions/", - "/internal/", - "/ranges/", - "/index.js", - "/preload.js", - "/range.bnf" - ] - } -} diff --git a/node_modules/jest-runtime/node_modules/semver/preload.js b/node_modules/jest-runtime/node_modules/semver/preload.js deleted file mode 100644 index 947cd4f79..000000000 --- a/node_modules/jest-runtime/node_modules/semver/preload.js +++ /dev/null @@ -1,2 +0,0 @@ -// XXX remove in v8 or beyond -module.exports = require('./index.js') diff --git a/node_modules/jest-runtime/node_modules/semver/range.bnf b/node_modules/jest-runtime/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d7..000000000 --- a/node_modules/jest-runtime/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/gtr.js b/node_modules/jest-runtime/node_modules/semver/ranges/gtr.js deleted file mode 100644 index db7e35599..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/gtr.js +++ /dev/null @@ -1,4 +0,0 @@ -// Determine if version is greater than all the versions possible in the range. -const outside = require('./outside') -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/intersects.js b/node_modules/jest-runtime/node_modules/semver/ranges/intersects.js deleted file mode 100644 index 3d1a6f31d..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/intersects.js +++ /dev/null @@ -1,7 +0,0 @@ -const Range = require('../classes/range') -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} -module.exports = intersects diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/ltr.js b/node_modules/jest-runtime/node_modules/semver/ranges/ltr.js deleted file mode 100644 index 528a885eb..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/ltr.js +++ /dev/null @@ -1,4 +0,0 @@ -const outside = require('./outside') -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/max-satisfying.js b/node_modules/jest-runtime/node_modules/semver/ranges/max-satisfying.js deleted file mode 100644 index 6e3d993c6..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/max-satisfying.js +++ /dev/null @@ -1,25 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/min-satisfying.js b/node_modules/jest-runtime/node_modules/semver/ranges/min-satisfying.js deleted file mode 100644 index 9b60974e2..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/min-satisfying.js +++ /dev/null @@ -1,24 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/min-version.js b/node_modules/jest-runtime/node_modules/semver/ranges/min-version.js deleted file mode 100644 index 350e1f783..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/min-version.js +++ /dev/null @@ -1,61 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const gt = require('../functions/gt') - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/outside.js b/node_modules/jest-runtime/node_modules/semver/ranges/outside.js deleted file mode 100644 index ae99b10a5..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/outside.js +++ /dev/null @@ -1,80 +0,0 @@ -const SemVer = require('../classes/semver') -const Comparator = require('../classes/comparator') -const { ANY } = Comparator -const Range = require('../classes/range') -const satisfies = require('../functions/satisfies') -const gt = require('../functions/gt') -const lt = require('../functions/lt') -const lte = require('../functions/lte') -const gte = require('../functions/gte') - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/simplify.js b/node_modules/jest-runtime/node_modules/semver/ranges/simplify.js deleted file mode 100644 index 618d5b627..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/simplify.js +++ /dev/null @@ -1,47 +0,0 @@ -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } - - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/subset.js b/node_modules/jest-runtime/node_modules/semver/ranges/subset.js deleted file mode 100644 index e0dea43c2..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/subset.js +++ /dev/null @@ -1,244 +0,0 @@ -const Range = require('../classes/range.js') -const Comparator = require('../classes/comparator.js') -const { ANY } = Comparator -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = [new Comparator('>=0.0.0-0')] - } else { - sub = [new Comparator('>=0.0.0')] - } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = [new Comparator('>=0.0.0')] - } - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } - } - - if (eqSet.size > 1) { - return null - } - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/to-comparators.js b/node_modules/jest-runtime/node_modules/semver/ranges/to-comparators.js deleted file mode 100644 index 6c8bc7e6f..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/to-comparators.js +++ /dev/null @@ -1,8 +0,0 @@ -const Range = require('../classes/range') - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators diff --git a/node_modules/jest-runtime/node_modules/semver/ranges/valid.js b/node_modules/jest-runtime/node_modules/semver/ranges/valid.js deleted file mode 100644 index 365f35689..000000000 --- a/node_modules/jest-runtime/node_modules/semver/ranges/valid.js +++ /dev/null @@ -1,11 +0,0 @@ -const Range = require('../classes/range') -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange diff --git a/node_modules/jest-runtime/node_modules/yallist/LICENSE b/node_modules/jest-runtime/node_modules/yallist/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/jest-runtime/node_modules/yallist/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/jest-runtime/node_modules/yallist/README.md b/node_modules/jest-runtime/node_modules/yallist/README.md deleted file mode 100644 index f58610186..000000000 --- a/node_modules/jest-runtime/node_modules/yallist/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# yallist - -Yet Another Linked List - -There are many doubly-linked list implementations like it, but this -one is mine. - -For when an array would be too big, and a Map can't be iterated in -reverse order. - - -[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) - -## basic usage - -```javascript -var yallist = require('yallist') -var myList = yallist.create([1, 2, 3]) -myList.push('foo') -myList.unshift('bar') -// of course pop() and shift() are there, too -console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] -myList.forEach(function (k) { - // walk the list head to tail -}) -myList.forEachReverse(function (k, index, list) { - // walk the list tail to head -}) -var myDoubledList = myList.map(function (k) { - return k + k -}) -// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] -// mapReverse is also a thing -var myDoubledListReverse = myList.mapReverse(function (k) { - return k + k -}) // ['foofoo', 6, 4, 2, 'barbar'] - -var reduced = myList.reduce(function (set, entry) { - set += entry - return set -}, 'start') -console.log(reduced) // 'startfoo123bar' -``` - -## api - -The whole API is considered "public". - -Functions with the same name as an Array method work more or less the -same way. - -There's reverse versions of most things because that's the point. - -### Yallist - -Default export, the class that holds and manages a list. - -Call it with either a forEach-able (like an array) or a set of -arguments, to initialize the list. - -The Array-ish methods all act like you'd expect. No magic length, -though, so if you change that it won't automatically prune or add -empty spots. - -### Yallist.create(..) - -Alias for Yallist function. Some people like factories. - -#### yallist.head - -The first node in the list - -#### yallist.tail - -The last node in the list - -#### yallist.length - -The number of nodes in the list. (Change this at your peril. It is -not magic like Array length.) - -#### yallist.toArray() - -Convert the list to an array. - -#### yallist.forEach(fn, [thisp]) - -Call a function on each item in the list. - -#### yallist.forEachReverse(fn, [thisp]) - -Call a function on each item in the list, in reverse order. - -#### yallist.get(n) - -Get the data at position `n` in the list. If you use this a lot, -probably better off just using an Array. - -#### yallist.getReverse(n) - -Get the data at position `n`, counting from the tail. - -#### yallist.map(fn, thisp) - -Create a new Yallist with the result of calling the function on each -item. - -#### yallist.mapReverse(fn, thisp) - -Same as `map`, but in reverse. - -#### yallist.pop() - -Get the data from the list tail, and remove the tail from the list. - -#### yallist.push(item, ...) - -Insert one or more items to the tail of the list. - -#### yallist.reduce(fn, initialValue) - -Like Array.reduce. - -#### yallist.reduceReverse - -Like Array.reduce, but in reverse. - -#### yallist.reverse - -Reverse the list in place. - -#### yallist.shift() - -Get the data from the list head, and remove the head from the list. - -#### yallist.slice([from], [to]) - -Just like Array.slice, but returns a new Yallist. - -#### yallist.sliceReverse([from], [to]) - -Just like yallist.slice, but the result is returned in reverse. - -#### yallist.toArray() - -Create an array representation of the list. - -#### yallist.toArrayReverse() - -Create a reversed array representation of the list. - -#### yallist.unshift(item, ...) - -Insert one or more items to the head of the list. - -#### yallist.unshiftNode(node) - -Move a Node object to the front of the list. (That is, pull it out of -wherever it lives, and make it the new head.) - -If the node belongs to a different list, then that list will remove it -first. - -#### yallist.pushNode(node) - -Move a Node object to the end of the list. (That is, pull it out of -wherever it lives, and make it the new tail.) - -If the node belongs to a list already, then that list will remove it -first. - -#### yallist.removeNode(node) - -Remove a node from the list, preserving referential integrity of head -and tail and other nodes. - -Will throw an error if you try to have a list remove a node that -doesn't belong to it. - -### Yallist.Node - -The class that holds the data and is actually the list. - -Call with `var n = new Node(value, previousNode, nextNode)` - -Note that if you do direct operations on Nodes themselves, it's very -easy to get into weird states where the list is broken. Be careful :) - -#### node.next - -The next node in the list. - -#### node.prev - -The previous node in the list. - -#### node.value - -The data the node contains. - -#### node.list - -The list to which this node belongs. (Null if it does not belong to -any list.) diff --git a/node_modules/jest-runtime/node_modules/yallist/iterator.js b/node_modules/jest-runtime/node_modules/yallist/iterator.js deleted file mode 100644 index d41c97a19..000000000 --- a/node_modules/jest-runtime/node_modules/yallist/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } - } -} diff --git a/node_modules/jest-runtime/node_modules/yallist/package.json b/node_modules/jest-runtime/node_modules/yallist/package.json deleted file mode 100644 index 8a083867d..000000000 --- a/node_modules/jest-runtime/node_modules/yallist/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "yallist", - "version": "4.0.0", - "description": "Yet Another Linked List", - "main": "yallist.js", - "directories": { - "test": "test" - }, - "files": [ - "yallist.js", - "iterator.js" - ], - "dependencies": {}, - "devDependencies": { - "tap": "^12.1.0" - }, - "scripts": { - "test": "tap test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/yallist.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" -} diff --git a/node_modules/jest-runtime/node_modules/yallist/yallist.js b/node_modules/jest-runtime/node_modules/yallist/yallist.js deleted file mode 100644 index 4e83ab1c5..000000000 --- a/node_modules/jest-runtime/node_modules/yallist/yallist.js +++ /dev/null @@ -1,426 +0,0 @@ -'use strict' -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } - - self.tail = null - self.head = null - self.length = 0 - - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) - } - } - - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } - - var next = node.next - var prev = node.prev - - if (next) { - next.prev = prev - } - - if (prev) { - prev.next = next - } - - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev - } - - node.list.length-- - node.next = null - node.prev = null - node.list = null - - return next -} - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } - - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} - -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } - - if (node.list) { - node.list.removeNode(node) - } - - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } - - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} - -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length -} - -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } - - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} - -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } - - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} - -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} - -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} - -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } -} - -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next - } - return res -} - -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res -} - -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } - - return acc -} - -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } - - return acc -} - -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} - -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} - -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} - -Yallist.prototype.splice = function (start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1 - } - if (start < 0) { - start = this.length + start; - } - - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next - } - - var ret = [] - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value) - walker = this.removeNode(walker) - } - if (walker === null) { - walker = this.tail - } - - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev - } - - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]) - } - return ret; -} - -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p - } - this.head = tail - this.tail = head - return this -} - -function insert (self, node, value) { - var inserted = node === self.head ? - new Node(value, null, node, self) : - new Node(value, node, node.next, self) - - if (inserted.next === null) { - self.tail = inserted - } - if (inserted.prev === null) { - self.head = inserted - } - - self.length++ - - return inserted -} - -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ -} - -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} - -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } - - this.list = list - this.value = value - - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } - - if (next) { - next.prev = this - this.next = next - } else { - this.next = null - } -} - -try { - // add if support for Symbol.iterator is present - require('./iterator.js')(Yallist) -} catch (er) {} diff --git a/node_modules/jest-runtime/package.json b/node_modules/jest-runtime/package.json index 6c8d2dfa7..1c185c65d 100644 --- a/node_modules/jest-runtime/package.json +++ b/node_modules/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,36 +17,34 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/globals": "^29.4.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/globals": "^29.5.0", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "semver": "^7.3.5", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "devDependencies": { - "@jest/test-utils": "^29.4.1", + "@jest/test-utils": "^29.5.0", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.3", - "@types/semver": "^7.1.0", - "jest-environment-node": "^29.4.1" + "jest-environment-node": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -54,5 +52,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-snapshot/LICENSE b/node_modules/jest-snapshot/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-snapshot/LICENSE +++ b/node_modules/jest-snapshot/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-snapshot/build/InlineSnapshots.js b/node_modules/jest-snapshot/build/InlineSnapshots.js index 86c642ae7..eb989a2f2 100644 --- a/node_modules/jest-snapshot/build/InlineSnapshots.js +++ b/node_modules/jest-snapshot/build/InlineSnapshots.js @@ -116,7 +116,7 @@ const saveSnapshotsForFile = (snapshots, sourceFilePath, rootDir, prettier) => { // TypeScript projects may not have a babel config; make sure they can be parsed anyway. const presets = [require.resolve('babel-preset-current-node-syntax')]; const plugins = []; - if (/\.tsx?$/.test(sourceFilePath)) { + if (/\.([cm]?ts|tsx)$/.test(sourceFilePath)) { plugins.push([ require.resolve('@babel/plugin-syntax-typescript'), { diff --git a/node_modules/jest-snapshot/build/SnapshotResolver.js b/node_modules/jest-snapshot/build/SnapshotResolver.js index 88b36762a..351f7eabe 100644 --- a/node_modules/jest-snapshot/build/SnapshotResolver.js +++ b/node_modules/jest-snapshot/build/SnapshotResolver.js @@ -56,7 +56,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-snapshot/build/colors.js b/node_modules/jest-snapshot/build/colors.js index b2e573285..e729c37e3 100644 --- a/node_modules/jest-snapshot/build/colors.js +++ b/node_modules/jest-snapshot/build/colors.js @@ -13,7 +13,7 @@ exports.bForeground3 = exports.aBackground2 = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-snapshot/build/dedentLines.js b/node_modules/jest-snapshot/build/dedentLines.js index 6e1381574..818543813 100644 --- a/node_modules/jest-snapshot/build/dedentLines.js +++ b/node_modules/jest-snapshot/build/dedentLines.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.dedentLines = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-snapshot/build/index.d.ts b/node_modules/jest-snapshot/build/index.d.ts index 8a21545ae..6a5cbcd5c 100644 --- a/node_modules/jest-snapshot/build/index.d.ts +++ b/node_modules/jest-snapshot/build/index.d.ts @@ -1,11 +1,10 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {Config} from '@jest/types'; -import type {IHasteFS} from 'jest-haste-map'; import type {MatcherContext} from 'expect'; import type {MatcherFunctionWithContext} from 'expect'; import {Plugin as Plugin_2} from 'pretty-format'; @@ -20,7 +19,7 @@ export declare const buildSnapshotResolver: ( ) => Promise; export declare const cleanup: ( - hasteFS: IHasteFS, + fileSystem: FileSystem_2, update: Config.SnapshotUpdateState, snapshotResolver: SnapshotResolver, testPathIgnorePatterns?: Config.ProjectConfig['testPathIgnorePatterns'], @@ -35,6 +34,11 @@ export declare interface Context extends MatcherContext { export declare const EXTENSION = 'snap'; +declare interface FileSystem_2 { + exists(path: string): boolean; + matchFiles(pattern: RegExp | string): Array; +} + export declare const getSerializers: () => Plugins; export declare const isSnapshotPath: (path: string) => boolean; diff --git a/node_modules/jest-snapshot/build/index.js b/node_modules/jest-snapshot/build/index.js index f459e3fb6..33eddf130 100644 --- a/node_modules/jest-snapshot/build/index.js +++ b/node_modules/jest-snapshot/build/index.js @@ -156,11 +156,16 @@ function stripAddedIndentation(inlineSnapshot) { inlineSnapshot = lines.join('\n'); return inlineSnapshot; } -const fileExists = (filePath, hasteFS) => - hasteFS.exists(filePath) || jestExistsFile(filePath); -const cleanup = (hasteFS, update, snapshotResolver, testPathIgnorePatterns) => { +const fileExists = (filePath, fileSystem) => + fileSystem.exists(filePath) || jestExistsFile(filePath); +const cleanup = ( + fileSystem, + update, + snapshotResolver, + testPathIgnorePatterns +) => { const pattern = `\\.${_SnapshotResolver.EXTENSION}$`; - const files = hasteFS.matchFiles(pattern); + const files = fileSystem.matchFiles(pattern); let testIgnorePatternsRegex = null; if (testPathIgnorePatterns && testPathIgnorePatterns.length > 0) { testIgnorePatternsRegex = new RegExp(testPathIgnorePatterns.join('|')); @@ -172,7 +177,7 @@ const cleanup = (hasteFS, update, snapshotResolver, testPathIgnorePatterns) => { if (testIgnorePatternsRegex && testIgnorePatternsRegex.test(testPath)) { return false; } - if (!fileExists(testPath, hasteFS)) { + if (!fileExists(testPath, fileSystem)) { if (update === 'all') { fs.unlinkSync(snapshotFile); } diff --git a/node_modules/jest-snapshot/build/mockSerializer.js b/node_modules/jest-snapshot/build/mockSerializer.js index e6b6fd429..dd10f7780 100644 --- a/node_modules/jest-snapshot/build/mockSerializer.js +++ b/node_modules/jest-snapshot/build/mockSerializer.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.test = exports.serialize = exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-snapshot/build/plugins.js b/node_modules/jest-snapshot/build/plugins.js index 6dc79dc7f..3d4484d11 100644 --- a/node_modules/jest-snapshot/build/plugins.js +++ b/node_modules/jest-snapshot/build/plugins.js @@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-snapshot/build/printSnapshot.js b/node_modules/jest-snapshot/build/printSnapshot.js index bdfe4479a..13f28f42a 100644 --- a/node_modules/jest-snapshot/build/printSnapshot.js +++ b/node_modules/jest-snapshot/build/printSnapshot.js @@ -30,7 +30,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-snapshot/package.json b/node_modules/jest-snapshot/package.json index 21283953d..f39b946a8 100644 --- a/node_modules/jest-snapshot/package.json +++ b/node_modules/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -23,29 +23,28 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/expect-utils": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.4.1", + "expect": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "semver": "^7.3.5" }, "devDependencies": { "@babel/preset-flow": "^7.7.2", "@babel/preset-react": "^7.12.1", - "@jest/test-utils": "^29.4.1", + "@jest/test-utils": "^29.5.0", "@tsd/typescript": "^4.9.0", "@types/babel__core": "^7.1.14", "@types/graceful-fs": "^4.1.3", @@ -62,5 +61,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-util/LICENSE b/node_modules/jest-util/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-util/LICENSE +++ b/node_modules/jest-util/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-util/build/ErrorWithStack.js b/node_modules/jest-util/build/ErrorWithStack.js index a7fdfc01d..43aa026be 100644 --- a/node_modules/jest-util/build/ErrorWithStack.js +++ b/node_modules/jest-util/build/ErrorWithStack.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/clearLine.js b/node_modules/jest-util/build/clearLine.js index fbaf2c7a3..3db590149 100644 --- a/node_modules/jest-util/build/clearLine.js +++ b/node_modules/jest-util/build/clearLine.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = clearLine; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/convertDescriptorToString.js b/node_modules/jest-util/build/convertDescriptorToString.js index 2b6b486a0..e4b8e58b2 100644 --- a/node_modules/jest-util/build/convertDescriptorToString.js +++ b/node_modules/jest-util/build/convertDescriptorToString.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = convertDescriptorToString; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/createDirectory.js b/node_modules/jest-util/build/createDirectory.js index 4d5a0f13e..693b93b66 100644 --- a/node_modules/jest-util/build/createDirectory.js +++ b/node_modules/jest-util/build/createDirectory.js @@ -52,7 +52,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/createProcessObject.js b/node_modules/jest-util/build/createProcessObject.js index a5ddcf369..a2c554d2e 100644 --- a/node_modules/jest-util/build/createProcessObject.js +++ b/node_modules/jest-util/build/createProcessObject.js @@ -9,7 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/deepCyclicCopy.js b/node_modules/jest-util/build/deepCyclicCopy.js index e5915821b..e847a785d 100644 --- a/node_modules/jest-util/build/deepCyclicCopy.js +++ b/node_modules/jest-util/build/deepCyclicCopy.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = deepCyclicCopy; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/formatTime.js b/node_modules/jest-util/build/formatTime.js index 46a1c66c4..deac8d27a 100644 --- a/node_modules/jest-util/build/formatTime.js +++ b/node_modules/jest-util/build/formatTime.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = formatTime; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/globsToMatcher.js b/node_modules/jest-util/build/globsToMatcher.js index 037c886a0..7a6091194 100644 --- a/node_modules/jest-util/build/globsToMatcher.js +++ b/node_modules/jest-util/build/globsToMatcher.js @@ -18,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/index.d.ts b/node_modules/jest-util/build/index.d.ts index e3908454a..2f37e985e 100644 --- a/node_modules/jest-util/build/index.d.ts +++ b/node_modules/jest-util/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/installCommonGlobals.js b/node_modules/jest-util/build/installCommonGlobals.js index 53816e01b..9c72bc5f0 100644 --- a/node_modules/jest-util/build/installCommonGlobals.js +++ b/node_modules/jest-util/build/installCommonGlobals.js @@ -59,7 +59,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/interopRequireDefault.js b/node_modules/jest-util/build/interopRequireDefault.js index 121b79dee..851074af5 100644 --- a/node_modules/jest-util/build/interopRequireDefault.js +++ b/node_modules/jest-util/build/interopRequireDefault.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = interopRequireDefault; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/isInteractive.js b/node_modules/jest-util/build/isInteractive.js index 3942eba49..b4588ba05 100644 --- a/node_modules/jest-util/build/isInteractive.js +++ b/node_modules/jest-util/build/isInteractive.js @@ -12,7 +12,7 @@ function _ciInfo() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/isPromise.js b/node_modules/jest-util/build/isPromise.js index bee0d330b..53dd5df4b 100644 --- a/node_modules/jest-util/build/isPromise.js +++ b/node_modules/jest-util/build/isPromise.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = isPromise; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/pluralize.js b/node_modules/jest-util/build/pluralize.js index 5f03ccc98..c99f08dab 100644 --- a/node_modules/jest-util/build/pluralize.js +++ b/node_modules/jest-util/build/pluralize.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = pluralize; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/preRunMessage.js b/node_modules/jest-util/build/preRunMessage.js index d71e885da..3f614b408 100644 --- a/node_modules/jest-util/build/preRunMessage.js +++ b/node_modules/jest-util/build/preRunMessage.js @@ -18,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/replacePathSepForGlob.js b/node_modules/jest-util/build/replacePathSepForGlob.js index b8d821ee8..ff8066399 100644 --- a/node_modules/jest-util/build/replacePathSepForGlob.js +++ b/node_modules/jest-util/build/replacePathSepForGlob.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = replacePathSepForGlob; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/requireOrImportModule.js b/node_modules/jest-util/build/requireOrImportModule.js index e2c0967fc..10c6e1ad7 100644 --- a/node_modules/jest-util/build/requireOrImportModule.js +++ b/node_modules/jest-util/build/requireOrImportModule.js @@ -25,7 +25,7 @@ function _interopRequireDefault2(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/setGlobal.js b/node_modules/jest-util/build/setGlobal.js index c5c55ec0c..d4b2eb048 100644 --- a/node_modules/jest-util/build/setGlobal.js +++ b/node_modules/jest-util/build/setGlobal.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = setGlobal; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/specialChars.js b/node_modules/jest-util/build/specialChars.js index fa52b370d..ce5de433d 100644 --- a/node_modules/jest-util/build/specialChars.js +++ b/node_modules/jest-util/build/specialChars.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.ICONS = exports.CLEAR = exports.ARROW = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/testPathPatternToRegExp.js b/node_modules/jest-util/build/testPathPatternToRegExp.js index c384c8ca7..3db3b6168 100644 --- a/node_modules/jest-util/build/testPathPatternToRegExp.js +++ b/node_modules/jest-util/build/testPathPatternToRegExp.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = testPathPatternToRegExp; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/build/tryRealpath.js b/node_modules/jest-util/build/tryRealpath.js index 406f16a68..cdd47e05c 100644 --- a/node_modules/jest-util/build/tryRealpath.js +++ b/node_modules/jest-util/build/tryRealpath.js @@ -12,7 +12,7 @@ function _gracefulFs() { return data; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-util/package.json b/node_modules/jest-util/package.json index e5c9a34e3..2c9b8a617 100644 --- a/node_modules/jest-util/package.json +++ b/node_modules/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,7 +17,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -34,5 +34,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-validate/LICENSE b/node_modules/jest-validate/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-validate/LICENSE +++ b/node_modules/jest-validate/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-validate/build/condition.js b/node_modules/jest-validate/build/condition.js index b672359a8..4b19031dd 100644 --- a/node_modules/jest-validate/build/condition.js +++ b/node_modules/jest-validate/build/condition.js @@ -7,7 +7,7 @@ exports.getValues = getValues; exports.multipleValidOptions = multipleValidOptions; exports.validationCondition = validationCondition; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/defaultConfig.js b/node_modules/jest-validate/build/defaultConfig.js index e1b6f97eb..c43f2c03a 100644 --- a/node_modules/jest-validate/build/defaultConfig.js +++ b/node_modules/jest-validate/build/defaultConfig.js @@ -10,7 +10,7 @@ var _errors = require('./errors'); var _utils = require('./utils'); var _warnings = require('./warnings'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/deprecated.js b/node_modules/jest-validate/build/deprecated.js index dec3b34d2..e5e807079 100644 --- a/node_modules/jest-validate/build/deprecated.js +++ b/node_modules/jest-validate/build/deprecated.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.deprecationWarning = void 0; var _utils = require('./utils'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/errors.js b/node_modules/jest-validate/build/errors.js index b2b5c9f50..4a288027f 100644 --- a/node_modules/jest-validate/build/errors.js +++ b/node_modules/jest-validate/build/errors.js @@ -24,7 +24,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/exampleConfig.js b/node_modules/jest-validate/build/exampleConfig.js index 500c8e074..92f2d6ccd 100644 --- a/node_modules/jest-validate/build/exampleConfig.js +++ b/node_modules/jest-validate/build/exampleConfig.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/index.d.ts b/node_modules/jest-validate/build/index.d.ts index ff3894eb1..64bd1de03 100644 --- a/node_modules/jest-validate/build/index.d.ts +++ b/node_modules/jest-validate/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/utils.js b/node_modules/jest-validate/build/utils.js index 9d24976b3..d10349682 100644 --- a/node_modules/jest-validate/build/utils.js +++ b/node_modules/jest-validate/build/utils.js @@ -37,7 +37,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/validate.js b/node_modules/jest-validate/build/validate.js index 2cb4c0520..f40ffdf7d 100644 --- a/node_modules/jest-validate/build/validate.js +++ b/node_modules/jest-validate/build/validate.js @@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/validateCLIOptions.js b/node_modules/jest-validate/build/validateCLIOptions.js index 570bd8d7c..299de0f3f 100644 --- a/node_modules/jest-validate/build/validateCLIOptions.js +++ b/node_modules/jest-validate/build/validateCLIOptions.js @@ -26,7 +26,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/build/warnings.js b/node_modules/jest-validate/build/warnings.js index 1a377a34a..1860d5ae3 100644 --- a/node_modules/jest-validate/build/warnings.js +++ b/node_modules/jest-validate/build/warnings.js @@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-validate/package.json b/node_modules/jest-validate/package.json index 45c27a1f6..49e24d958 100644 --- a/node_modules/jest-validate/package.json +++ b/node_modules/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,12 +17,12 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", + "jest-get-type": "^29.4.3", "leven": "^3.1.0", - "pretty-format": "^29.4.1" + "pretty-format": "^29.5.0" }, "devDependencies": { "@types/yargs": "^17.0.8" @@ -33,5 +33,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-watcher/LICENSE b/node_modules/jest-watcher/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-watcher/LICENSE +++ b/node_modules/jest-watcher/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-watcher/build/BaseWatchPlugin.js b/node_modules/jest-watcher/build/BaseWatchPlugin.js index ed9f455c1..90ea785a1 100644 --- a/node_modules/jest-watcher/build/BaseWatchPlugin.js +++ b/node_modules/jest-watcher/build/BaseWatchPlugin.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/JestHooks.js b/node_modules/jest-watcher/build/JestHooks.js index 50d4d8e7f..ddc2731a9 100644 --- a/node_modules/jest-watcher/build/JestHooks.js +++ b/node_modules/jest-watcher/build/JestHooks.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/PatternPrompt.js b/node_modules/jest-watcher/build/PatternPrompt.js index 792f96910..558788630 100644 --- a/node_modules/jest-watcher/build/PatternPrompt.js +++ b/node_modules/jest-watcher/build/PatternPrompt.js @@ -29,7 +29,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/TestWatcher.js b/node_modules/jest-watcher/build/TestWatcher.js index 465ddc78b..75578dbb6 100644 --- a/node_modules/jest-watcher/build/TestWatcher.js +++ b/node_modules/jest-watcher/build/TestWatcher.js @@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/constants.js b/node_modules/jest-watcher/build/constants.js index 39edec718..54706decb 100644 --- a/node_modules/jest-watcher/build/constants.js +++ b/node_modules/jest-watcher/build/constants.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.KEYS = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/index.d.ts b/node_modules/jest-watcher/build/index.d.ts index ac0c9f52c..7d2c1a109 100644 --- a/node_modules/jest-watcher/build/index.d.ts +++ b/node_modules/jest-watcher/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/lib/Prompt.js b/node_modules/jest-watcher/build/lib/Prompt.js index 62a3f8e21..c6c5f5f04 100644 --- a/node_modules/jest-watcher/build/lib/Prompt.js +++ b/node_modules/jest-watcher/build/lib/Prompt.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.default = void 0; var _constants = require('../constants'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/lib/colorize.js b/node_modules/jest-watcher/build/lib/colorize.js index 7e52b249f..b339cc5c5 100644 --- a/node_modules/jest-watcher/build/lib/colorize.js +++ b/node_modules/jest-watcher/build/lib/colorize.js @@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js b/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js index 977a52c2b..9fdc3a4e5 100644 --- a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js +++ b/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js @@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/lib/patternModeHelpers.js b/node_modules/jest-watcher/build/lib/patternModeHelpers.js index 9fcfc1750..873a6e2e9 100644 --- a/node_modules/jest-watcher/build/lib/patternModeHelpers.js +++ b/node_modules/jest-watcher/build/lib/patternModeHelpers.js @@ -30,7 +30,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/build/lib/scroll.js b/node_modules/jest-watcher/build/lib/scroll.js index 9375bb38e..b9e459391 100644 --- a/node_modules/jest-watcher/build/lib/scroll.js +++ b/node_modules/jest-watcher/build/lib/scroll.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = scroll; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-watcher/package.json b/node_modules/jest-watcher/package.json index 4f1107b90..b3816aa95 100644 --- a/node_modules/jest-watcher/package.json +++ b/node_modules/jest-watcher/package.json @@ -1,7 +1,7 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "29.4.1", + "version": "29.5.0", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { @@ -12,13 +12,13 @@ "./package.json": "./package.json" }, "dependencies": { - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "string-length": "^4.0.1" }, "repository": { @@ -37,5 +37,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest-worker/LICENSE b/node_modules/jest-worker/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest-worker/LICENSE +++ b/node_modules/jest-worker/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-worker/README.md b/node_modules/jest-worker/README.md index 1277ed824..bf14f9fe7 100644 --- a/node_modules/jest-worker/README.md +++ b/node_modules/jest-worker/README.md @@ -49,9 +49,9 @@ To use `worker_threads` instead of default `child_process` you have to pass `ena The `Worker` export is a constructor that is initialized by passing the worker path, plus an options object. -### `workerPath: string` (required) +### `workerPath: string | URL` (required) -Node module name or absolute path of the file to be loaded in the child processes. Use `require.resolve` to transform a relative path into an absolute one. +Node module name or absolute path or file URL of the file to be loaded in the child processes. You can use `require.resolve` to transform a relative path into an absolute one. ### `options: Object` (optional) @@ -140,11 +140,17 @@ Returns a `ReadableStream` where the standard output of all workers is piped. No Returns a `ReadableStream` where the standard error of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. +#### `start()` + +Starts up every worker and calls their `setup` function, if it exists. Returns a `Promise` which resolves when all workers are running and have completed their `setup`. + +This is useful if you want to start up all your workers eagerly before they are used to call any other functions. + #### `end()` Finishes the workers by killing all workers. No further calls can be done to the `Worker` instance. -Returns a Promise that resolves with `{ forceExited: boolean }` once all workers are dead. If `forceExited` is `true`, at least one of the workers did not exit gracefully, which likely happened because it executed a leaky task that left handles open. This should be avoided, force exiting workers is a last resort to prevent creating lots of orphans. +Returns a `Promise` that resolves with `{ forceExited: boolean }` once all workers are dead. If `forceExited` is `true`, at least one of the workers did not exit gracefully, which likely happened because it executed a leaky task that left handles open. This should be avoided, force exiting workers is a last resort to prevent creating lots of orphans. **Note:** diff --git a/node_modules/jest-worker/build/Farm.js b/node_modules/jest-worker/build/Farm.js index cdcbe669d..bb9accf67 100644 --- a/node_modules/jest-worker/build/Farm.js +++ b/node_modules/jest-worker/build/Farm.js @@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-worker/build/FifoQueue.js b/node_modules/jest-worker/build/FifoQueue.js index 4f45bf21b..1831e024b 100644 --- a/node_modules/jest-worker/build/FifoQueue.js +++ b/node_modules/jest-worker/build/FifoQueue.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-worker/build/PriorityQueue.js b/node_modules/jest-worker/build/PriorityQueue.js index bba74fde2..6218a8ea6 100644 --- a/node_modules/jest-worker/build/PriorityQueue.js +++ b/node_modules/jest-worker/build/PriorityQueue.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-worker/build/WorkerPool.js b/node_modules/jest-worker/build/WorkerPool.js index 7efd52675..67ec60aba 100644 --- a/node_modules/jest-worker/build/WorkerPool.js +++ b/node_modules/jest-worker/build/WorkerPool.js @@ -9,7 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-worker/build/base/BaseWorkerPool.js b/node_modules/jest-worker/build/base/BaseWorkerPool.js index 1cc355685..1be8b5637 100644 --- a/node_modules/jest-worker/build/base/BaseWorkerPool.js +++ b/node_modules/jest-worker/build/base/BaseWorkerPool.js @@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -79,6 +79,27 @@ class BaseWorkerPool { createWorker(_workerOptions) { throw Error('Missing method createWorker in WorkerPool'); } + async start() { + await Promise.all( + this._workers.map(async worker => { + await worker.waitForWorkerReady(); + await new Promise((resolve, reject) => { + worker.send( + [_types.CHILD_MESSAGE_CALL_SETUP], + emptyMethod, + error => { + if (error) { + reject(error); + } else { + resolve(); + } + }, + emptyMethod + ); + }); + }) + ); + } async end() { // We do not cache the request object here. If so, it would only be only // processed by one of the workers, and we want them all to close. diff --git a/node_modules/jest-worker/build/index.d.ts b/node_modules/jest-worker/build/index.d.ts index 1ef2c5e20..11a672488 100644 --- a/node_modules/jest-worker/build/index.d.ts +++ b/node_modules/jest-worker/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -11,6 +11,8 @@ import type {ResourceLimits} from 'worker_threads'; declare const CHILD_MESSAGE_CALL = 1; +declare const CHILD_MESSAGE_CALL_SETUP = 4; + declare const CHILD_MESSAGE_END = 2; declare const CHILD_MESSAGE_INITIALIZE = 0; @@ -21,7 +23,8 @@ declare type ChildMessage = | ChildMessageInitialize | ChildMessageCall | ChildMessageEnd - | ChildMessageMemUsage; + | ChildMessageMemUsage + | ChildMessageCallSetup; declare type ChildMessageCall = [ type: typeof CHILD_MESSAGE_CALL, @@ -30,6 +33,8 @@ declare type ChildMessageCall = [ args: Array, ]; +declare type ChildMessageCallSetup = [type: typeof CHILD_MESSAGE_CALL_SETUP]; + declare type ChildMessageEnd = [ type: typeof CHILD_MESSAGE_END, isProcessed: boolean, @@ -199,11 +204,12 @@ declare class Worker_2 { private readonly _farm; private readonly _options; private readonly _workerPool; - constructor(workerPath: string, options?: WorkerFarmOptions); + constructor(workerPath: string | URL, options?: WorkerFarmOptions); private _bindExposedWorkerMethods; private _callFunctionWithArgs; getStderr(): NodeJS.ReadableStream; getStdout(): NodeJS.ReadableStream; + start(): Promise; end(): Promise; } export {Worker_2 as Worker}; @@ -321,6 +327,7 @@ export declare interface WorkerPoolInterface { getWorkers(): Array; createWorker(options: WorkerOptions_2): WorkerInterface; send: WorkerCallback; + start(): Promise; end(): Promise; } diff --git a/node_modules/jest-worker/build/index.js b/node_modules/jest-worker/build/index.js index bd7ef28f4..6e840cc2a 100644 --- a/node_modules/jest-worker/build/index.js +++ b/node_modules/jest-worker/build/index.js @@ -36,6 +36,13 @@ function _path() { }; return data; } +function _url() { + const data = require('url'); + _url = function () { + return data; + }; + return data; +} var _Farm = _interopRequireDefault(require('./Farm')); var _WorkerPool = _interopRequireDefault(require('./WorkerPool')); var _PriorityQueue = _interopRequireDefault(require('./PriorityQueue')); @@ -45,7 +52,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -107,7 +114,12 @@ class Worker { ...options }; this._ending = false; - if (!(0, _path().isAbsolute)(workerPath)) { + if (typeof workerPath !== 'string') { + workerPath = workerPath.href; + } + if (workerPath.startsWith('file:')) { + workerPath = (0, _url().fileURLToPath)(workerPath); + } else if (!(0, _path().isAbsolute)(workerPath)) { throw new Error(`'workerPath' must be absolute, got '${workerPath}'`); } const workerPoolOptions = { @@ -166,6 +178,9 @@ class Worker { getStdout() { return this._workerPool.getStdout(); } + async start() { + await this._workerPool.start(); + } async end() { if (this._ending) { throw new Error('Farm is ended, no more calls can be done to it'); diff --git a/node_modules/jest-worker/build/types.js b/node_modules/jest-worker/build/types.js index d1e23f21b..34552bd33 100644 --- a/node_modules/jest-worker/build/types.js +++ b/node_modules/jest-worker/build/types.js @@ -13,10 +13,11 @@ exports.WorkerStates = exports.CHILD_MESSAGE_MEM_USAGE = exports.CHILD_MESSAGE_INITIALIZE = exports.CHILD_MESSAGE_END = + exports.CHILD_MESSAGE_CALL_SETUP = exports.CHILD_MESSAGE_CALL = void 0; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -34,6 +35,8 @@ const CHILD_MESSAGE_END = 2; exports.CHILD_MESSAGE_END = CHILD_MESSAGE_END; const CHILD_MESSAGE_MEM_USAGE = 3; exports.CHILD_MESSAGE_MEM_USAGE = CHILD_MESSAGE_MEM_USAGE; +const CHILD_MESSAGE_CALL_SETUP = 4; +exports.CHILD_MESSAGE_CALL_SETUP = CHILD_MESSAGE_CALL_SETUP; const PARENT_MESSAGE_OK = 0; exports.PARENT_MESSAGE_OK = PARENT_MESSAGE_OK; const PARENT_MESSAGE_CLIENT_ERROR = 1; diff --git a/node_modules/jest-worker/build/workers/ChildProcessWorker.js b/node_modules/jest-worker/build/workers/ChildProcessWorker.js index 6599cc91f..6a9d1f369 100644 --- a/node_modules/jest-worker/build/workers/ChildProcessWorker.js +++ b/node_modules/jest-worker/build/workers/ChildProcessWorker.js @@ -38,7 +38,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -240,6 +240,9 @@ class ChildProcessWorker extends _WorkerAbstract.default { } } _onMessage(response) { + // Ignore messages not intended for us + if (!Array.isArray(response)) return; + // TODO: Add appropriate type check let error; switch (response[0]) { @@ -281,7 +284,8 @@ class ChildProcessWorker extends _WorkerAbstract.default { this._performRestartIfRequired(); break; default: - throw new TypeError(`Unexpected response from worker: ${response[0]}`); + // Ignore messages not intended for us + break; } } _performRestartIfRequired() { diff --git a/node_modules/jest-worker/build/workers/NodeThreadsWorker.js b/node_modules/jest-worker/build/workers/NodeThreadsWorker.js index 6f3aa0abf..e25247a6d 100644 --- a/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +++ b/node_modules/jest-worker/build/workers/NodeThreadsWorker.js @@ -31,7 +31,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -153,6 +153,8 @@ class ExperimentalWorker extends _WorkerAbstract.default { } } _onMessage(response) { + // Ignore messages not intended for us + if (!Array.isArray(response)) return; let error; switch (response[0]) { case _types.PARENT_MESSAGE_OK: @@ -196,7 +198,8 @@ class ExperimentalWorker extends _WorkerAbstract.default { this._performRestartIfRequired(); break; default: - throw new TypeError(`Unexpected response from worker: ${response[0]}`); + // Ignore messages not intended for us + break; } } _onExit(exitCode) { diff --git a/node_modules/jest-worker/build/workers/WorkerAbstract.js b/node_modules/jest-worker/build/workers/WorkerAbstract.js index 19692aa52..1bd32f52a 100644 --- a/node_modules/jest-worker/build/workers/WorkerAbstract.js +++ b/node_modules/jest-worker/build/workers/WorkerAbstract.js @@ -13,7 +13,7 @@ function _stream() { } var _types = require('../types'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-worker/build/workers/messageParent.js b/node_modules/jest-worker/build/workers/messageParent.js index cc352dec5..62e2ccec5 100644 --- a/node_modules/jest-worker/build/workers/messageParent.js +++ b/node_modules/jest-worker/build/workers/messageParent.js @@ -13,7 +13,7 @@ function _worker_threads() { } var _types = require('../types'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest-worker/build/workers/processChild.js b/node_modules/jest-worker/build/workers/processChild.js index e99eaa397..1a47f23c1 100644 --- a/node_modules/jest-worker/build/workers/processChild.js +++ b/node_modules/jest-worker/build/workers/processChild.js @@ -9,7 +9,7 @@ function _jestUtil() { } var _types = require('../types'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -49,6 +49,25 @@ const messageListener = request => { case _types.CHILD_MESSAGE_MEM_USAGE: reportMemoryUsage(); break; + case _types.CHILD_MESSAGE_CALL_SETUP: + if (initialized) { + reportSuccess(void 0); + } else { + const main = require(file); + initialized = true; + if (main.setup) { + execFunction( + main.setup, + main, + setupArgs, + reportSuccess, + reportInitializeError + ); + } else { + reportSuccess(void 0); + } + } + break; default: throw new TypeError( `Unexpected request from parent process: ${request[0]}` diff --git a/node_modules/jest-worker/build/workers/threadChild.js b/node_modules/jest-worker/build/workers/threadChild.js index fc71fdd24..d4bbc2db6 100644 --- a/node_modules/jest-worker/build/workers/threadChild.js +++ b/node_modules/jest-worker/build/workers/threadChild.js @@ -16,7 +16,7 @@ function _jestUtil() { } var _types = require('../types'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. @@ -57,6 +57,25 @@ const messageListener = request => { case _types.CHILD_MESSAGE_MEM_USAGE: reportMemoryUsage(); break; + case _types.CHILD_MESSAGE_CALL_SETUP: + if (initialized) { + reportSuccess(void 0); + } else { + const main = require(file); + initialized = true; + if (main.setup) { + execFunction( + main.setup, + main, + setupArgs, + reportSuccess, + reportInitializeError + ); + } else { + reportSuccess(void 0); + } + } + break; default: throw new TypeError( `Unexpected request from parent process: ${request[0]}` diff --git a/node_modules/jest-worker/package.json b/node_modules/jest-worker/package.json index d305e3d7d..03dc4e5eb 100644 --- a/node_modules/jest-worker/package.json +++ b/node_modules/jest-worker/package.json @@ -1,6 +1,6 @@ { "name": "jest-worker", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,16 +18,17 @@ }, "dependencies": { "@types/node": "*", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "devDependencies": { + "@babel/core": "^7.11.6", "@tsd/typescript": "^4.9.0", "@types/merge-stream": "^1.1.2", "@types/supports-color": "^8.1.0", "get-stream": "^6.0.0", - "jest-leak-detector": "^29.4.1", + "jest-leak-detector": "^29.5.0", "tsd-lite": "^0.6.0", "worker-farm": "^1.6.0" }, @@ -37,5 +38,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/jest/LICENSE b/node_modules/jest/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/jest/LICENSE +++ b/node_modules/jest/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest/bin/jest.js b/node_modules/jest/bin/jest.js index 4a828880a..f3be8f9dd 100755 --- a/node_modules/jest/bin/jest.js +++ b/node_modules/jest/bin/jest.js @@ -1,6 +1,6 @@ #!/usr/bin/env node /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest/build/index.d.ts b/node_modules/jest/build/index.d.ts index da6592cac..05e21ab8f 100644 --- a/node_modules/jest/build/index.d.ts +++ b/node_modules/jest/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/jest/package.json b/node_modules/jest/package.json index 2b6ce1bbe..179de91f6 100644 --- a/node_modules/jest/package.json +++ b/node_modules/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "29.4.1", + "version": "29.5.0", "main": "./build/index.js", "types": "./build/index.d.ts", "exports": { @@ -13,10 +13,10 @@ "./bin/jest": "./bin/jest.js" }, "dependencies": { - "@jest/core": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/types": "^29.5.0", "import-local": "^3.0.2", - "jest-cli": "^29.4.1" + "jest-cli": "^29.5.0" }, "devDependencies": { "@tsd/typescript": "^4.9.0", @@ -70,5 +70,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/node-releases/README.md b/node_modules/node-releases/README.md index 114fb4a26..d30d2003e 100644 --- a/node_modules/node-releases/README.md +++ b/node_modules/node-releases/README.md @@ -2,30 +2,11 @@ All data is located in `data` directory. -`data/raw` contains raw data `nodejs.json` and `iojs.json`. +`data/processed` contains `envs.json` with node.js releases data preprocessed to be used by [Browserslist](https://github.com/ai/browserslist) and other projects. Each version in this file contains only necessary info: version, release date, LTS flag/name, and security flag. -`data/processed` contains `envs.js` with both node.js and io.js data preprocessed to be used by [Browserslist](https://github.com/ai/browserslist) and other projects. Each version in this file contains only necessary info: version, release date and optionally LTS flag. +`data/release-schedule` contains `release-schedule.json` with node.js releases date and end of life date. ## Installation ```bash -npm install --save node-releases +npm install node-releases ``` - -## Updating data -```bash -npm run build -``` -This is a build script which fetches data from web, processes it and saves processed data to `data/processed/envs.json`. If you want to run this steps separately you can use commands described below. - - -### Fetching data -```bash -npm run fetch -``` -This npm script will download new data to `data/raw` directory. Also it'll download Node.js release schedule into `release-schedule` folder. - -### Processing data -```bash -npm run process -``` -This script generates `envs.json` file from raw data files and saves it to `data/processed` directory. diff --git a/node_modules/node-releases/data/processed/envs.json b/node_modules/node-releases/data/processed/envs.json index 3e0cfbdd3..ebb7d4021 100644 --- a/node_modules/node-releases/data/processed/envs.json +++ b/node_modules/node-releases/data/processed/envs.json @@ -1 +1 @@ -[{"name":"nodejs","version":"0.2.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.3.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.4.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.5.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.6.0","date":"2011-11-04","lts":false,"security":false},{"name":"nodejs","version":"0.7.0","date":"2012-01-17","lts":false,"security":false},{"name":"nodejs","version":"0.8.0","date":"2012-06-22","lts":false,"security":false},{"name":"nodejs","version":"0.9.0","date":"2012-07-20","lts":false,"security":false},{"name":"nodejs","version":"0.10.0","date":"2013-03-11","lts":false,"security":false},{"name":"nodejs","version":"0.11.0","date":"2013-03-28","lts":false,"security":false},{"name":"nodejs","version":"0.12.0","date":"2015-02-06","lts":false,"security":false},{"name":"nodejs","version":"4.0.0","date":"2015-09-08","lts":false,"security":false},{"name":"nodejs","version":"4.1.0","date":"2015-09-17","lts":false,"security":false},{"name":"nodejs","version":"4.2.0","date":"2015-10-12","lts":"Argon","security":false},{"name":"nodejs","version":"4.3.0","date":"2016-02-09","lts":"Argon","security":false},{"name":"nodejs","version":"4.4.0","date":"2016-03-08","lts":"Argon","security":false},{"name":"nodejs","version":"4.5.0","date":"2016-08-16","lts":"Argon","security":false},{"name":"nodejs","version":"4.6.0","date":"2016-09-27","lts":"Argon","security":true},{"name":"nodejs","version":"4.7.0","date":"2016-12-06","lts":"Argon","security":false},{"name":"nodejs","version":"4.8.0","date":"2017-02-21","lts":"Argon","security":false},{"name":"nodejs","version":"4.9.0","date":"2018-03-28","lts":"Argon","security":true},{"name":"nodejs","version":"5.0.0","date":"2015-10-29","lts":false,"security":false},{"name":"nodejs","version":"5.1.0","date":"2015-11-17","lts":false,"security":false},{"name":"nodejs","version":"5.2.0","date":"2015-12-09","lts":false,"security":false},{"name":"nodejs","version":"5.3.0","date":"2015-12-15","lts":false,"security":false},{"name":"nodejs","version":"5.4.0","date":"2016-01-06","lts":false,"security":false},{"name":"nodejs","version":"5.5.0","date":"2016-01-21","lts":false,"security":false},{"name":"nodejs","version":"5.6.0","date":"2016-02-09","lts":false,"security":false},{"name":"nodejs","version":"5.7.0","date":"2016-02-23","lts":false,"security":false},{"name":"nodejs","version":"5.8.0","date":"2016-03-09","lts":false,"security":false},{"name":"nodejs","version":"5.9.0","date":"2016-03-16","lts":false,"security":false},{"name":"nodejs","version":"5.10.0","date":"2016-04-01","lts":false,"security":false},{"name":"nodejs","version":"5.11.0","date":"2016-04-21","lts":false,"security":false},{"name":"nodejs","version":"5.12.0","date":"2016-06-23","lts":false,"security":false},{"name":"nodejs","version":"6.0.0","date":"2016-04-26","lts":false,"security":false},{"name":"nodejs","version":"6.1.0","date":"2016-05-05","lts":false,"security":false},{"name":"nodejs","version":"6.2.0","date":"2016-05-17","lts":false,"security":false},{"name":"nodejs","version":"6.3.0","date":"2016-07-06","lts":false,"security":false},{"name":"nodejs","version":"6.4.0","date":"2016-08-12","lts":false,"security":false},{"name":"nodejs","version":"6.5.0","date":"2016-08-26","lts":false,"security":false},{"name":"nodejs","version":"6.6.0","date":"2016-09-14","lts":false,"security":false},{"name":"nodejs","version":"6.7.0","date":"2016-09-27","lts":false,"security":true},{"name":"nodejs","version":"6.8.0","date":"2016-10-12","lts":false,"security":false},{"name":"nodejs","version":"6.9.0","date":"2016-10-18","lts":"Boron","security":false},{"name":"nodejs","version":"6.10.0","date":"2017-02-21","lts":"Boron","security":false},{"name":"nodejs","version":"6.11.0","date":"2017-06-06","lts":"Boron","security":false},{"name":"nodejs","version":"6.12.0","date":"2017-11-06","lts":"Boron","security":false},{"name":"nodejs","version":"6.13.0","date":"2018-02-10","lts":"Boron","security":false},{"name":"nodejs","version":"6.14.0","date":"2018-03-28","lts":"Boron","security":true},{"name":"nodejs","version":"6.15.0","date":"2018-11-27","lts":"Boron","security":true},{"name":"nodejs","version":"6.16.0","date":"2018-12-26","lts":"Boron","security":false},{"name":"nodejs","version":"6.17.0","date":"2019-02-28","lts":"Boron","security":true},{"name":"nodejs","version":"7.0.0","date":"2016-10-25","lts":false,"security":false},{"name":"nodejs","version":"7.1.0","date":"2016-11-08","lts":false,"security":false},{"name":"nodejs","version":"7.2.0","date":"2016-11-22","lts":false,"security":false},{"name":"nodejs","version":"7.3.0","date":"2016-12-20","lts":false,"security":false},{"name":"nodejs","version":"7.4.0","date":"2017-01-04","lts":false,"security":false},{"name":"nodejs","version":"7.5.0","date":"2017-01-31","lts":false,"security":false},{"name":"nodejs","version":"7.6.0","date":"2017-02-21","lts":false,"security":false},{"name":"nodejs","version":"7.7.0","date":"2017-02-28","lts":false,"security":false},{"name":"nodejs","version":"7.8.0","date":"2017-03-29","lts":false,"security":false},{"name":"nodejs","version":"7.9.0","date":"2017-04-11","lts":false,"security":false},{"name":"nodejs","version":"7.10.0","date":"2017-05-02","lts":false,"security":false},{"name":"nodejs","version":"8.0.0","date":"2017-05-30","lts":false,"security":false},{"name":"nodejs","version":"8.1.0","date":"2017-06-08","lts":false,"security":false},{"name":"nodejs","version":"8.2.0","date":"2017-07-19","lts":false,"security":false},{"name":"nodejs","version":"8.3.0","date":"2017-08-08","lts":false,"security":false},{"name":"nodejs","version":"8.4.0","date":"2017-08-15","lts":false,"security":false},{"name":"nodejs","version":"8.5.0","date":"2017-09-12","lts":false,"security":false},{"name":"nodejs","version":"8.6.0","date":"2017-09-26","lts":false,"security":false},{"name":"nodejs","version":"8.7.0","date":"2017-10-11","lts":false,"security":false},{"name":"nodejs","version":"8.8.0","date":"2017-10-24","lts":false,"security":false},{"name":"nodejs","version":"8.9.0","date":"2017-10-31","lts":"Carbon","security":false},{"name":"nodejs","version":"8.10.0","date":"2018-03-06","lts":"Carbon","security":false},{"name":"nodejs","version":"8.11.0","date":"2018-03-28","lts":"Carbon","security":true},{"name":"nodejs","version":"8.12.0","date":"2018-09-10","lts":"Carbon","security":false},{"name":"nodejs","version":"8.13.0","date":"2018-11-20","lts":"Carbon","security":false},{"name":"nodejs","version":"8.14.0","date":"2018-11-27","lts":"Carbon","security":true},{"name":"nodejs","version":"8.15.0","date":"2018-12-26","lts":"Carbon","security":false},{"name":"nodejs","version":"8.16.0","date":"2019-04-16","lts":"Carbon","security":false},{"name":"nodejs","version":"8.17.0","date":"2019-12-17","lts":"Carbon","security":true},{"name":"nodejs","version":"9.0.0","date":"2017-10-31","lts":false,"security":false},{"name":"nodejs","version":"9.1.0","date":"2017-11-07","lts":false,"security":false},{"name":"nodejs","version":"9.2.0","date":"2017-11-14","lts":false,"security":false},{"name":"nodejs","version":"9.3.0","date":"2017-12-12","lts":false,"security":false},{"name":"nodejs","version":"9.4.0","date":"2018-01-10","lts":false,"security":false},{"name":"nodejs","version":"9.5.0","date":"2018-01-31","lts":false,"security":false},{"name":"nodejs","version":"9.6.0","date":"2018-02-21","lts":false,"security":false},{"name":"nodejs","version":"9.7.0","date":"2018-03-01","lts":false,"security":false},{"name":"nodejs","version":"9.8.0","date":"2018-03-07","lts":false,"security":false},{"name":"nodejs","version":"9.9.0","date":"2018-03-21","lts":false,"security":false},{"name":"nodejs","version":"9.10.0","date":"2018-03-28","lts":false,"security":true},{"name":"nodejs","version":"9.11.0","date":"2018-04-04","lts":false,"security":false},{"name":"nodejs","version":"10.0.0","date":"2018-04-24","lts":false,"security":false},{"name":"nodejs","version":"10.1.0","date":"2018-05-08","lts":false,"security":false},{"name":"nodejs","version":"10.2.0","date":"2018-05-23","lts":false,"security":false},{"name":"nodejs","version":"10.3.0","date":"2018-05-29","lts":false,"security":false},{"name":"nodejs","version":"10.4.0","date":"2018-06-06","lts":false,"security":false},{"name":"nodejs","version":"10.5.0","date":"2018-06-20","lts":false,"security":false},{"name":"nodejs","version":"10.6.0","date":"2018-07-04","lts":false,"security":false},{"name":"nodejs","version":"10.7.0","date":"2018-07-18","lts":false,"security":false},{"name":"nodejs","version":"10.8.0","date":"2018-08-01","lts":false,"security":false},{"name":"nodejs","version":"10.9.0","date":"2018-08-15","lts":false,"security":false},{"name":"nodejs","version":"10.10.0","date":"2018-09-06","lts":false,"security":false},{"name":"nodejs","version":"10.11.0","date":"2018-09-19","lts":false,"security":false},{"name":"nodejs","version":"10.12.0","date":"2018-10-10","lts":false,"security":false},{"name":"nodejs","version":"10.13.0","date":"2018-10-30","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.14.0","date":"2018-11-27","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.15.0","date":"2018-12-26","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.16.0","date":"2019-05-28","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.17.0","date":"2019-10-22","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.18.0","date":"2019-12-17","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.19.0","date":"2020-02-05","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.20.0","date":"2020-03-26","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.21.0","date":"2020-06-02","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.22.0","date":"2020-07-21","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.23.0","date":"2020-10-27","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.24.0","date":"2021-02-23","lts":"Dubnium","security":true},{"name":"nodejs","version":"11.0.0","date":"2018-10-23","lts":false,"security":false},{"name":"nodejs","version":"11.1.0","date":"2018-10-30","lts":false,"security":false},{"name":"nodejs","version":"11.2.0","date":"2018-11-15","lts":false,"security":false},{"name":"nodejs","version":"11.3.0","date":"2018-11-27","lts":false,"security":true},{"name":"nodejs","version":"11.4.0","date":"2018-12-07","lts":false,"security":false},{"name":"nodejs","version":"11.5.0","date":"2018-12-18","lts":false,"security":false},{"name":"nodejs","version":"11.6.0","date":"2018-12-26","lts":false,"security":false},{"name":"nodejs","version":"11.7.0","date":"2019-01-17","lts":false,"security":false},{"name":"nodejs","version":"11.8.0","date":"2019-01-24","lts":false,"security":false},{"name":"nodejs","version":"11.9.0","date":"2019-01-30","lts":false,"security":false},{"name":"nodejs","version":"11.10.0","date":"2019-02-14","lts":false,"security":false},{"name":"nodejs","version":"11.11.0","date":"2019-03-05","lts":false,"security":false},{"name":"nodejs","version":"11.12.0","date":"2019-03-14","lts":false,"security":false},{"name":"nodejs","version":"11.13.0","date":"2019-03-28","lts":false,"security":false},{"name":"nodejs","version":"11.14.0","date":"2019-04-10","lts":false,"security":false},{"name":"nodejs","version":"11.15.0","date":"2019-04-30","lts":false,"security":false},{"name":"nodejs","version":"12.0.0","date":"2019-04-23","lts":false,"security":false},{"name":"nodejs","version":"12.1.0","date":"2019-04-29","lts":false,"security":false},{"name":"nodejs","version":"12.2.0","date":"2019-05-07","lts":false,"security":false},{"name":"nodejs","version":"12.3.0","date":"2019-05-21","lts":false,"security":false},{"name":"nodejs","version":"12.4.0","date":"2019-06-04","lts":false,"security":false},{"name":"nodejs","version":"12.5.0","date":"2019-06-26","lts":false,"security":false},{"name":"nodejs","version":"12.6.0","date":"2019-07-03","lts":false,"security":false},{"name":"nodejs","version":"12.7.0","date":"2019-07-23","lts":false,"security":false},{"name":"nodejs","version":"12.8.0","date":"2019-08-06","lts":false,"security":false},{"name":"nodejs","version":"12.9.0","date":"2019-08-20","lts":false,"security":false},{"name":"nodejs","version":"12.10.0","date":"2019-09-04","lts":false,"security":false},{"name":"nodejs","version":"12.11.0","date":"2019-09-25","lts":false,"security":false},{"name":"nodejs","version":"12.12.0","date":"2019-10-11","lts":false,"security":false},{"name":"nodejs","version":"12.13.0","date":"2019-10-21","lts":"Erbium","security":false},{"name":"nodejs","version":"12.14.0","date":"2019-12-17","lts":"Erbium","security":true},{"name":"nodejs","version":"12.15.0","date":"2020-02-05","lts":"Erbium","security":true},{"name":"nodejs","version":"12.16.0","date":"2020-02-11","lts":"Erbium","security":false},{"name":"nodejs","version":"12.17.0","date":"2020-05-26","lts":"Erbium","security":false},{"name":"nodejs","version":"12.18.0","date":"2020-06-02","lts":"Erbium","security":true},{"name":"nodejs","version":"12.19.0","date":"2020-10-06","lts":"Erbium","security":false},{"name":"nodejs","version":"12.20.0","date":"2020-11-24","lts":"Erbium","security":false},{"name":"nodejs","version":"12.21.0","date":"2021-02-23","lts":"Erbium","security":true},{"name":"nodejs","version":"12.22.0","date":"2021-03-30","lts":"Erbium","security":false},{"name":"nodejs","version":"13.0.0","date":"2019-10-22","lts":false,"security":false},{"name":"nodejs","version":"13.1.0","date":"2019-11-05","lts":false,"security":false},{"name":"nodejs","version":"13.2.0","date":"2019-11-21","lts":false,"security":false},{"name":"nodejs","version":"13.3.0","date":"2019-12-03","lts":false,"security":false},{"name":"nodejs","version":"13.4.0","date":"2019-12-17","lts":false,"security":true},{"name":"nodejs","version":"13.5.0","date":"2019-12-18","lts":false,"security":false},{"name":"nodejs","version":"13.6.0","date":"2020-01-07","lts":false,"security":false},{"name":"nodejs","version":"13.7.0","date":"2020-01-21","lts":false,"security":false},{"name":"nodejs","version":"13.8.0","date":"2020-02-05","lts":false,"security":true},{"name":"nodejs","version":"13.9.0","date":"2020-02-18","lts":false,"security":false},{"name":"nodejs","version":"13.10.0","date":"2020-03-04","lts":false,"security":false},{"name":"nodejs","version":"13.11.0","date":"2020-03-12","lts":false,"security":false},{"name":"nodejs","version":"13.12.0","date":"2020-03-26","lts":false,"security":false},{"name":"nodejs","version":"13.13.0","date":"2020-04-14","lts":false,"security":false},{"name":"nodejs","version":"13.14.0","date":"2020-04-29","lts":false,"security":false},{"name":"nodejs","version":"14.0.0","date":"2020-04-21","lts":false,"security":false},{"name":"nodejs","version":"14.1.0","date":"2020-04-29","lts":false,"security":false},{"name":"nodejs","version":"14.2.0","date":"2020-05-05","lts":false,"security":false},{"name":"nodejs","version":"14.3.0","date":"2020-05-19","lts":false,"security":false},{"name":"nodejs","version":"14.4.0","date":"2020-06-02","lts":false,"security":true},{"name":"nodejs","version":"14.5.0","date":"2020-06-30","lts":false,"security":false},{"name":"nodejs","version":"14.6.0","date":"2020-07-20","lts":false,"security":false},{"name":"nodejs","version":"14.7.0","date":"2020-07-29","lts":false,"security":false},{"name":"nodejs","version":"14.8.0","date":"2020-08-11","lts":false,"security":false},{"name":"nodejs","version":"14.9.0","date":"2020-08-27","lts":false,"security":false},{"name":"nodejs","version":"14.10.0","date":"2020-09-08","lts":false,"security":false},{"name":"nodejs","version":"14.11.0","date":"2020-09-15","lts":false,"security":true},{"name":"nodejs","version":"14.12.0","date":"2020-09-22","lts":false,"security":false},{"name":"nodejs","version":"14.13.0","date":"2020-09-29","lts":false,"security":false},{"name":"nodejs","version":"14.14.0","date":"2020-10-15","lts":false,"security":false},{"name":"nodejs","version":"14.15.0","date":"2020-10-27","lts":"Fermium","security":false},{"name":"nodejs","version":"14.16.0","date":"2021-02-23","lts":"Fermium","security":true},{"name":"nodejs","version":"14.17.0","date":"2021-05-11","lts":"Fermium","security":false},{"name":"nodejs","version":"14.18.0","date":"2021-09-28","lts":"Fermium","security":false},{"name":"nodejs","version":"14.19.0","date":"2022-02-01","lts":"Fermium","security":false},{"name":"nodejs","version":"14.20.0","date":"2022-07-07","lts":"Fermium","security":true},{"name":"nodejs","version":"14.21.0","date":"2022-11-01","lts":"Fermium","security":false},{"name":"nodejs","version":"15.0.0","date":"2020-10-20","lts":false,"security":false},{"name":"nodejs","version":"15.1.0","date":"2020-11-04","lts":false,"security":false},{"name":"nodejs","version":"15.2.0","date":"2020-11-10","lts":false,"security":false},{"name":"nodejs","version":"15.3.0","date":"2020-11-24","lts":false,"security":false},{"name":"nodejs","version":"15.4.0","date":"2020-12-09","lts":false,"security":false},{"name":"nodejs","version":"15.5.0","date":"2020-12-22","lts":false,"security":false},{"name":"nodejs","version":"15.6.0","date":"2021-01-14","lts":false,"security":false},{"name":"nodejs","version":"15.7.0","date":"2021-01-25","lts":false,"security":false},{"name":"nodejs","version":"15.8.0","date":"2021-02-02","lts":false,"security":false},{"name":"nodejs","version":"15.9.0","date":"2021-02-18","lts":false,"security":false},{"name":"nodejs","version":"15.10.0","date":"2021-02-23","lts":false,"security":true},{"name":"nodejs","version":"15.11.0","date":"2021-03-03","lts":false,"security":false},{"name":"nodejs","version":"15.12.0","date":"2021-03-17","lts":false,"security":false},{"name":"nodejs","version":"15.13.0","date":"2021-03-31","lts":false,"security":false},{"name":"nodejs","version":"15.14.0","date":"2021-04-06","lts":false,"security":false},{"name":"nodejs","version":"16.0.0","date":"2021-04-20","lts":false,"security":false},{"name":"nodejs","version":"16.1.0","date":"2021-05-04","lts":false,"security":false},{"name":"nodejs","version":"16.2.0","date":"2021-05-19","lts":false,"security":false},{"name":"nodejs","version":"16.3.0","date":"2021-06-03","lts":false,"security":false},{"name":"nodejs","version":"16.4.0","date":"2021-06-23","lts":false,"security":false},{"name":"nodejs","version":"16.5.0","date":"2021-07-14","lts":false,"security":false},{"name":"nodejs","version":"16.6.0","date":"2021-07-29","lts":false,"security":true},{"name":"nodejs","version":"16.7.0","date":"2021-08-18","lts":false,"security":false},{"name":"nodejs","version":"16.8.0","date":"2021-08-25","lts":false,"security":false},{"name":"nodejs","version":"16.9.0","date":"2021-09-07","lts":false,"security":false},{"name":"nodejs","version":"16.10.0","date":"2021-09-22","lts":false,"security":false},{"name":"nodejs","version":"16.11.0","date":"2021-10-08","lts":false,"security":false},{"name":"nodejs","version":"16.12.0","date":"2021-10-20","lts":false,"security":false},{"name":"nodejs","version":"16.13.0","date":"2021-10-26","lts":"Gallium","security":false},{"name":"nodejs","version":"16.14.0","date":"2022-02-08","lts":"Gallium","security":false},{"name":"nodejs","version":"16.15.0","date":"2022-04-26","lts":"Gallium","security":false},{"name":"nodejs","version":"16.16.0","date":"2022-07-07","lts":"Gallium","security":true},{"name":"nodejs","version":"16.17.0","date":"2022-08-16","lts":"Gallium","security":false},{"name":"nodejs","version":"16.18.0","date":"2022-10-12","lts":"Gallium","security":false},{"name":"nodejs","version":"16.19.0","date":"2022-12-13","lts":"Gallium","security":false},{"name":"nodejs","version":"17.0.0","date":"2021-10-19","lts":false,"security":false},{"name":"nodejs","version":"17.1.0","date":"2021-11-09","lts":false,"security":false},{"name":"nodejs","version":"17.2.0","date":"2021-11-30","lts":false,"security":false},{"name":"nodejs","version":"17.3.0","date":"2021-12-17","lts":false,"security":false},{"name":"nodejs","version":"17.4.0","date":"2022-01-18","lts":false,"security":false},{"name":"nodejs","version":"17.5.0","date":"2022-02-10","lts":false,"security":false},{"name":"nodejs","version":"17.6.0","date":"2022-02-22","lts":false,"security":false},{"name":"nodejs","version":"17.7.0","date":"2022-03-09","lts":false,"security":false},{"name":"nodejs","version":"17.8.0","date":"2022-03-22","lts":false,"security":false},{"name":"nodejs","version":"17.9.0","date":"2022-04-07","lts":false,"security":false},{"name":"nodejs","version":"18.0.0","date":"2022-04-18","lts":false,"security":false},{"name":"nodejs","version":"18.1.0","date":"2022-05-03","lts":false,"security":false},{"name":"nodejs","version":"18.2.0","date":"2022-05-17","lts":false,"security":false},{"name":"nodejs","version":"18.3.0","date":"2022-06-02","lts":false,"security":false},{"name":"nodejs","version":"18.4.0","date":"2022-06-16","lts":false,"security":false},{"name":"nodejs","version":"18.5.0","date":"2022-07-06","lts":false,"security":true},{"name":"nodejs","version":"18.6.0","date":"2022-07-13","lts":false,"security":false},{"name":"nodejs","version":"18.7.0","date":"2022-07-26","lts":false,"security":false},{"name":"nodejs","version":"18.8.0","date":"2022-08-24","lts":false,"security":false},{"name":"nodejs","version":"18.9.0","date":"2022-09-07","lts":false,"security":false},{"name":"nodejs","version":"18.10.0","date":"2022-09-28","lts":false,"security":false},{"name":"nodejs","version":"18.11.0","date":"2022-10-13","lts":false,"security":false},{"name":"nodejs","version":"18.12.0","date":"2022-10-25","lts":"Hydrogen","security":false},{"name":"nodejs","version":"19.0.0","date":"2022-10-17","lts":false,"security":false},{"name":"nodejs","version":"19.1.0","date":"2022-11-14","lts":false,"security":false},{"name":"nodejs","version":"19.2.0","date":"2022-11-29","lts":false,"security":false},{"name":"nodejs","version":"19.3.0","date":"2022-12-14","lts":false,"security":false}] \ No newline at end of file +[{"name":"nodejs","version":"0.2.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.3.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.4.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.5.0","date":"2011-08-26","lts":false,"security":false},{"name":"nodejs","version":"0.6.0","date":"2011-11-04","lts":false,"security":false},{"name":"nodejs","version":"0.7.0","date":"2012-01-17","lts":false,"security":false},{"name":"nodejs","version":"0.8.0","date":"2012-06-22","lts":false,"security":false},{"name":"nodejs","version":"0.9.0","date":"2012-07-20","lts":false,"security":false},{"name":"nodejs","version":"0.10.0","date":"2013-03-11","lts":false,"security":false},{"name":"nodejs","version":"0.11.0","date":"2013-03-28","lts":false,"security":false},{"name":"nodejs","version":"0.12.0","date":"2015-02-06","lts":false,"security":false},{"name":"nodejs","version":"4.0.0","date":"2015-09-08","lts":false,"security":false},{"name":"nodejs","version":"4.1.0","date":"2015-09-17","lts":false,"security":false},{"name":"nodejs","version":"4.2.0","date":"2015-10-12","lts":"Argon","security":false},{"name":"nodejs","version":"4.3.0","date":"2016-02-09","lts":"Argon","security":false},{"name":"nodejs","version":"4.4.0","date":"2016-03-08","lts":"Argon","security":false},{"name":"nodejs","version":"4.5.0","date":"2016-08-16","lts":"Argon","security":false},{"name":"nodejs","version":"4.6.0","date":"2016-09-27","lts":"Argon","security":true},{"name":"nodejs","version":"4.7.0","date":"2016-12-06","lts":"Argon","security":false},{"name":"nodejs","version":"4.8.0","date":"2017-02-21","lts":"Argon","security":false},{"name":"nodejs","version":"4.9.0","date":"2018-03-28","lts":"Argon","security":true},{"name":"nodejs","version":"5.0.0","date":"2015-10-29","lts":false,"security":false},{"name":"nodejs","version":"5.1.0","date":"2015-11-17","lts":false,"security":false},{"name":"nodejs","version":"5.2.0","date":"2015-12-09","lts":false,"security":false},{"name":"nodejs","version":"5.3.0","date":"2015-12-15","lts":false,"security":false},{"name":"nodejs","version":"5.4.0","date":"2016-01-06","lts":false,"security":false},{"name":"nodejs","version":"5.5.0","date":"2016-01-21","lts":false,"security":false},{"name":"nodejs","version":"5.6.0","date":"2016-02-09","lts":false,"security":false},{"name":"nodejs","version":"5.7.0","date":"2016-02-23","lts":false,"security":false},{"name":"nodejs","version":"5.8.0","date":"2016-03-09","lts":false,"security":false},{"name":"nodejs","version":"5.9.0","date":"2016-03-16","lts":false,"security":false},{"name":"nodejs","version":"5.10.0","date":"2016-04-01","lts":false,"security":false},{"name":"nodejs","version":"5.11.0","date":"2016-04-21","lts":false,"security":false},{"name":"nodejs","version":"5.12.0","date":"2016-06-23","lts":false,"security":false},{"name":"nodejs","version":"6.0.0","date":"2016-04-26","lts":false,"security":false},{"name":"nodejs","version":"6.1.0","date":"2016-05-05","lts":false,"security":false},{"name":"nodejs","version":"6.2.0","date":"2016-05-17","lts":false,"security":false},{"name":"nodejs","version":"6.3.0","date":"2016-07-06","lts":false,"security":false},{"name":"nodejs","version":"6.4.0","date":"2016-08-12","lts":false,"security":false},{"name":"nodejs","version":"6.5.0","date":"2016-08-26","lts":false,"security":false},{"name":"nodejs","version":"6.6.0","date":"2016-09-14","lts":false,"security":false},{"name":"nodejs","version":"6.7.0","date":"2016-09-27","lts":false,"security":true},{"name":"nodejs","version":"6.8.0","date":"2016-10-12","lts":false,"security":false},{"name":"nodejs","version":"6.9.0","date":"2016-10-18","lts":"Boron","security":false},{"name":"nodejs","version":"6.10.0","date":"2017-02-21","lts":"Boron","security":false},{"name":"nodejs","version":"6.11.0","date":"2017-06-06","lts":"Boron","security":false},{"name":"nodejs","version":"6.12.0","date":"2017-11-06","lts":"Boron","security":false},{"name":"nodejs","version":"6.13.0","date":"2018-02-10","lts":"Boron","security":false},{"name":"nodejs","version":"6.14.0","date":"2018-03-28","lts":"Boron","security":true},{"name":"nodejs","version":"6.15.0","date":"2018-11-27","lts":"Boron","security":true},{"name":"nodejs","version":"6.16.0","date":"2018-12-26","lts":"Boron","security":false},{"name":"nodejs","version":"6.17.0","date":"2019-02-28","lts":"Boron","security":true},{"name":"nodejs","version":"7.0.0","date":"2016-10-25","lts":false,"security":false},{"name":"nodejs","version":"7.1.0","date":"2016-11-08","lts":false,"security":false},{"name":"nodejs","version":"7.2.0","date":"2016-11-22","lts":false,"security":false},{"name":"nodejs","version":"7.3.0","date":"2016-12-20","lts":false,"security":false},{"name":"nodejs","version":"7.4.0","date":"2017-01-04","lts":false,"security":false},{"name":"nodejs","version":"7.5.0","date":"2017-01-31","lts":false,"security":false},{"name":"nodejs","version":"7.6.0","date":"2017-02-21","lts":false,"security":false},{"name":"nodejs","version":"7.7.0","date":"2017-02-28","lts":false,"security":false},{"name":"nodejs","version":"7.8.0","date":"2017-03-29","lts":false,"security":false},{"name":"nodejs","version":"7.9.0","date":"2017-04-11","lts":false,"security":false},{"name":"nodejs","version":"7.10.0","date":"2017-05-02","lts":false,"security":false},{"name":"nodejs","version":"8.0.0","date":"2017-05-30","lts":false,"security":false},{"name":"nodejs","version":"8.1.0","date":"2017-06-08","lts":false,"security":false},{"name":"nodejs","version":"8.2.0","date":"2017-07-19","lts":false,"security":false},{"name":"nodejs","version":"8.3.0","date":"2017-08-08","lts":false,"security":false},{"name":"nodejs","version":"8.4.0","date":"2017-08-15","lts":false,"security":false},{"name":"nodejs","version":"8.5.0","date":"2017-09-12","lts":false,"security":false},{"name":"nodejs","version":"8.6.0","date":"2017-09-26","lts":false,"security":false},{"name":"nodejs","version":"8.7.0","date":"2017-10-11","lts":false,"security":false},{"name":"nodejs","version":"8.8.0","date":"2017-10-24","lts":false,"security":false},{"name":"nodejs","version":"8.9.0","date":"2017-10-31","lts":"Carbon","security":false},{"name":"nodejs","version":"8.10.0","date":"2018-03-06","lts":"Carbon","security":false},{"name":"nodejs","version":"8.11.0","date":"2018-03-28","lts":"Carbon","security":true},{"name":"nodejs","version":"8.12.0","date":"2018-09-10","lts":"Carbon","security":false},{"name":"nodejs","version":"8.13.0","date":"2018-11-20","lts":"Carbon","security":false},{"name":"nodejs","version":"8.14.0","date":"2018-11-27","lts":"Carbon","security":true},{"name":"nodejs","version":"8.15.0","date":"2018-12-26","lts":"Carbon","security":false},{"name":"nodejs","version":"8.16.0","date":"2019-04-16","lts":"Carbon","security":false},{"name":"nodejs","version":"8.17.0","date":"2019-12-17","lts":"Carbon","security":true},{"name":"nodejs","version":"9.0.0","date":"2017-10-31","lts":false,"security":false},{"name":"nodejs","version":"9.1.0","date":"2017-11-07","lts":false,"security":false},{"name":"nodejs","version":"9.2.0","date":"2017-11-14","lts":false,"security":false},{"name":"nodejs","version":"9.3.0","date":"2017-12-12","lts":false,"security":false},{"name":"nodejs","version":"9.4.0","date":"2018-01-10","lts":false,"security":false},{"name":"nodejs","version":"9.5.0","date":"2018-01-31","lts":false,"security":false},{"name":"nodejs","version":"9.6.0","date":"2018-02-21","lts":false,"security":false},{"name":"nodejs","version":"9.7.0","date":"2018-03-01","lts":false,"security":false},{"name":"nodejs","version":"9.8.0","date":"2018-03-07","lts":false,"security":false},{"name":"nodejs","version":"9.9.0","date":"2018-03-21","lts":false,"security":false},{"name":"nodejs","version":"9.10.0","date":"2018-03-28","lts":false,"security":true},{"name":"nodejs","version":"9.11.0","date":"2018-04-04","lts":false,"security":false},{"name":"nodejs","version":"10.0.0","date":"2018-04-24","lts":false,"security":false},{"name":"nodejs","version":"10.1.0","date":"2018-05-08","lts":false,"security":false},{"name":"nodejs","version":"10.2.0","date":"2018-05-23","lts":false,"security":false},{"name":"nodejs","version":"10.3.0","date":"2018-05-29","lts":false,"security":false},{"name":"nodejs","version":"10.4.0","date":"2018-06-06","lts":false,"security":false},{"name":"nodejs","version":"10.5.0","date":"2018-06-20","lts":false,"security":false},{"name":"nodejs","version":"10.6.0","date":"2018-07-04","lts":false,"security":false},{"name":"nodejs","version":"10.7.0","date":"2018-07-18","lts":false,"security":false},{"name":"nodejs","version":"10.8.0","date":"2018-08-01","lts":false,"security":false},{"name":"nodejs","version":"10.9.0","date":"2018-08-15","lts":false,"security":false},{"name":"nodejs","version":"10.10.0","date":"2018-09-06","lts":false,"security":false},{"name":"nodejs","version":"10.11.0","date":"2018-09-19","lts":false,"security":false},{"name":"nodejs","version":"10.12.0","date":"2018-10-10","lts":false,"security":false},{"name":"nodejs","version":"10.13.0","date":"2018-10-30","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.14.0","date":"2018-11-27","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.15.0","date":"2018-12-26","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.16.0","date":"2019-05-28","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.17.0","date":"2019-10-22","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.18.0","date":"2019-12-17","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.19.0","date":"2020-02-05","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.20.0","date":"2020-03-26","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.21.0","date":"2020-06-02","lts":"Dubnium","security":true},{"name":"nodejs","version":"10.22.0","date":"2020-07-21","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.23.0","date":"2020-10-27","lts":"Dubnium","security":false},{"name":"nodejs","version":"10.24.0","date":"2021-02-23","lts":"Dubnium","security":true},{"name":"nodejs","version":"11.0.0","date":"2018-10-23","lts":false,"security":false},{"name":"nodejs","version":"11.1.0","date":"2018-10-30","lts":false,"security":false},{"name":"nodejs","version":"11.2.0","date":"2018-11-15","lts":false,"security":false},{"name":"nodejs","version":"11.3.0","date":"2018-11-27","lts":false,"security":true},{"name":"nodejs","version":"11.4.0","date":"2018-12-07","lts":false,"security":false},{"name":"nodejs","version":"11.5.0","date":"2018-12-18","lts":false,"security":false},{"name":"nodejs","version":"11.6.0","date":"2018-12-26","lts":false,"security":false},{"name":"nodejs","version":"11.7.0","date":"2019-01-17","lts":false,"security":false},{"name":"nodejs","version":"11.8.0","date":"2019-01-24","lts":false,"security":false},{"name":"nodejs","version":"11.9.0","date":"2019-01-30","lts":false,"security":false},{"name":"nodejs","version":"11.10.0","date":"2019-02-14","lts":false,"security":false},{"name":"nodejs","version":"11.11.0","date":"2019-03-05","lts":false,"security":false},{"name":"nodejs","version":"11.12.0","date":"2019-03-14","lts":false,"security":false},{"name":"nodejs","version":"11.13.0","date":"2019-03-28","lts":false,"security":false},{"name":"nodejs","version":"11.14.0","date":"2019-04-10","lts":false,"security":false},{"name":"nodejs","version":"11.15.0","date":"2019-04-30","lts":false,"security":false},{"name":"nodejs","version":"12.0.0","date":"2019-04-23","lts":false,"security":false},{"name":"nodejs","version":"12.1.0","date":"2019-04-29","lts":false,"security":false},{"name":"nodejs","version":"12.2.0","date":"2019-05-07","lts":false,"security":false},{"name":"nodejs","version":"12.3.0","date":"2019-05-21","lts":false,"security":false},{"name":"nodejs","version":"12.4.0","date":"2019-06-04","lts":false,"security":false},{"name":"nodejs","version":"12.5.0","date":"2019-06-26","lts":false,"security":false},{"name":"nodejs","version":"12.6.0","date":"2019-07-03","lts":false,"security":false},{"name":"nodejs","version":"12.7.0","date":"2019-07-23","lts":false,"security":false},{"name":"nodejs","version":"12.8.0","date":"2019-08-06","lts":false,"security":false},{"name":"nodejs","version":"12.9.0","date":"2019-08-20","lts":false,"security":false},{"name":"nodejs","version":"12.10.0","date":"2019-09-04","lts":false,"security":false},{"name":"nodejs","version":"12.11.0","date":"2019-09-25","lts":false,"security":false},{"name":"nodejs","version":"12.12.0","date":"2019-10-11","lts":false,"security":false},{"name":"nodejs","version":"12.13.0","date":"2019-10-21","lts":"Erbium","security":false},{"name":"nodejs","version":"12.14.0","date":"2019-12-17","lts":"Erbium","security":true},{"name":"nodejs","version":"12.15.0","date":"2020-02-05","lts":"Erbium","security":true},{"name":"nodejs","version":"12.16.0","date":"2020-02-11","lts":"Erbium","security":false},{"name":"nodejs","version":"12.17.0","date":"2020-05-26","lts":"Erbium","security":false},{"name":"nodejs","version":"12.18.0","date":"2020-06-02","lts":"Erbium","security":true},{"name":"nodejs","version":"12.19.0","date":"2020-10-06","lts":"Erbium","security":false},{"name":"nodejs","version":"12.20.0","date":"2020-11-24","lts":"Erbium","security":false},{"name":"nodejs","version":"12.21.0","date":"2021-02-23","lts":"Erbium","security":true},{"name":"nodejs","version":"12.22.0","date":"2021-03-30","lts":"Erbium","security":false},{"name":"nodejs","version":"13.0.0","date":"2019-10-22","lts":false,"security":false},{"name":"nodejs","version":"13.1.0","date":"2019-11-05","lts":false,"security":false},{"name":"nodejs","version":"13.2.0","date":"2019-11-21","lts":false,"security":false},{"name":"nodejs","version":"13.3.0","date":"2019-12-03","lts":false,"security":false},{"name":"nodejs","version":"13.4.0","date":"2019-12-17","lts":false,"security":true},{"name":"nodejs","version":"13.5.0","date":"2019-12-18","lts":false,"security":false},{"name":"nodejs","version":"13.6.0","date":"2020-01-07","lts":false,"security":false},{"name":"nodejs","version":"13.7.0","date":"2020-01-21","lts":false,"security":false},{"name":"nodejs","version":"13.8.0","date":"2020-02-05","lts":false,"security":true},{"name":"nodejs","version":"13.9.0","date":"2020-02-18","lts":false,"security":false},{"name":"nodejs","version":"13.10.0","date":"2020-03-04","lts":false,"security":false},{"name":"nodejs","version":"13.11.0","date":"2020-03-12","lts":false,"security":false},{"name":"nodejs","version":"13.12.0","date":"2020-03-26","lts":false,"security":false},{"name":"nodejs","version":"13.13.0","date":"2020-04-14","lts":false,"security":false},{"name":"nodejs","version":"13.14.0","date":"2020-04-29","lts":false,"security":false},{"name":"nodejs","version":"14.0.0","date":"2020-04-21","lts":false,"security":false},{"name":"nodejs","version":"14.1.0","date":"2020-04-29","lts":false,"security":false},{"name":"nodejs","version":"14.2.0","date":"2020-05-05","lts":false,"security":false},{"name":"nodejs","version":"14.3.0","date":"2020-05-19","lts":false,"security":false},{"name":"nodejs","version":"14.4.0","date":"2020-06-02","lts":false,"security":true},{"name":"nodejs","version":"14.5.0","date":"2020-06-30","lts":false,"security":false},{"name":"nodejs","version":"14.6.0","date":"2020-07-20","lts":false,"security":false},{"name":"nodejs","version":"14.7.0","date":"2020-07-29","lts":false,"security":false},{"name":"nodejs","version":"14.8.0","date":"2020-08-11","lts":false,"security":false},{"name":"nodejs","version":"14.9.0","date":"2020-08-27","lts":false,"security":false},{"name":"nodejs","version":"14.10.0","date":"2020-09-08","lts":false,"security":false},{"name":"nodejs","version":"14.11.0","date":"2020-09-15","lts":false,"security":true},{"name":"nodejs","version":"14.12.0","date":"2020-09-22","lts":false,"security":false},{"name":"nodejs","version":"14.13.0","date":"2020-09-29","lts":false,"security":false},{"name":"nodejs","version":"14.14.0","date":"2020-10-15","lts":false,"security":false},{"name":"nodejs","version":"14.15.0","date":"2020-10-27","lts":"Fermium","security":false},{"name":"nodejs","version":"14.16.0","date":"2021-02-23","lts":"Fermium","security":true},{"name":"nodejs","version":"14.17.0","date":"2021-05-11","lts":"Fermium","security":false},{"name":"nodejs","version":"14.18.0","date":"2021-09-28","lts":"Fermium","security":false},{"name":"nodejs","version":"14.19.0","date":"2022-02-01","lts":"Fermium","security":false},{"name":"nodejs","version":"14.20.0","date":"2022-07-07","lts":"Fermium","security":true},{"name":"nodejs","version":"14.21.0","date":"2022-11-01","lts":"Fermium","security":false},{"name":"nodejs","version":"15.0.0","date":"2020-10-20","lts":false,"security":false},{"name":"nodejs","version":"15.1.0","date":"2020-11-04","lts":false,"security":false},{"name":"nodejs","version":"15.2.0","date":"2020-11-10","lts":false,"security":false},{"name":"nodejs","version":"15.3.0","date":"2020-11-24","lts":false,"security":false},{"name":"nodejs","version":"15.4.0","date":"2020-12-09","lts":false,"security":false},{"name":"nodejs","version":"15.5.0","date":"2020-12-22","lts":false,"security":false},{"name":"nodejs","version":"15.6.0","date":"2021-01-14","lts":false,"security":false},{"name":"nodejs","version":"15.7.0","date":"2021-01-25","lts":false,"security":false},{"name":"nodejs","version":"15.8.0","date":"2021-02-02","lts":false,"security":false},{"name":"nodejs","version":"15.9.0","date":"2021-02-18","lts":false,"security":false},{"name":"nodejs","version":"15.10.0","date":"2021-02-23","lts":false,"security":true},{"name":"nodejs","version":"15.11.0","date":"2021-03-03","lts":false,"security":false},{"name":"nodejs","version":"15.12.0","date":"2021-03-17","lts":false,"security":false},{"name":"nodejs","version":"15.13.0","date":"2021-03-31","lts":false,"security":false},{"name":"nodejs","version":"15.14.0","date":"2021-04-06","lts":false,"security":false},{"name":"nodejs","version":"16.0.0","date":"2021-04-20","lts":false,"security":false},{"name":"nodejs","version":"16.1.0","date":"2021-05-04","lts":false,"security":false},{"name":"nodejs","version":"16.2.0","date":"2021-05-19","lts":false,"security":false},{"name":"nodejs","version":"16.3.0","date":"2021-06-03","lts":false,"security":false},{"name":"nodejs","version":"16.4.0","date":"2021-06-23","lts":false,"security":false},{"name":"nodejs","version":"16.5.0","date":"2021-07-14","lts":false,"security":false},{"name":"nodejs","version":"16.6.0","date":"2021-07-29","lts":false,"security":true},{"name":"nodejs","version":"16.7.0","date":"2021-08-18","lts":false,"security":false},{"name":"nodejs","version":"16.8.0","date":"2021-08-25","lts":false,"security":false},{"name":"nodejs","version":"16.9.0","date":"2021-09-07","lts":false,"security":false},{"name":"nodejs","version":"16.10.0","date":"2021-09-22","lts":false,"security":false},{"name":"nodejs","version":"16.11.0","date":"2021-10-08","lts":false,"security":false},{"name":"nodejs","version":"16.12.0","date":"2021-10-20","lts":false,"security":false},{"name":"nodejs","version":"16.13.0","date":"2021-10-26","lts":"Gallium","security":false},{"name":"nodejs","version":"16.14.0","date":"2022-02-08","lts":"Gallium","security":false},{"name":"nodejs","version":"16.15.0","date":"2022-04-26","lts":"Gallium","security":false},{"name":"nodejs","version":"16.16.0","date":"2022-07-07","lts":"Gallium","security":true},{"name":"nodejs","version":"16.17.0","date":"2022-08-16","lts":"Gallium","security":false},{"name":"nodejs","version":"16.18.0","date":"2022-10-12","lts":"Gallium","security":false},{"name":"nodejs","version":"16.19.0","date":"2022-12-13","lts":"Gallium","security":false},{"name":"nodejs","version":"17.0.0","date":"2021-10-19","lts":false,"security":false},{"name":"nodejs","version":"17.1.0","date":"2021-11-09","lts":false,"security":false},{"name":"nodejs","version":"17.2.0","date":"2021-11-30","lts":false,"security":false},{"name":"nodejs","version":"17.3.0","date":"2021-12-17","lts":false,"security":false},{"name":"nodejs","version":"17.4.0","date":"2022-01-18","lts":false,"security":false},{"name":"nodejs","version":"17.5.0","date":"2022-02-10","lts":false,"security":false},{"name":"nodejs","version":"17.6.0","date":"2022-02-22","lts":false,"security":false},{"name":"nodejs","version":"17.7.0","date":"2022-03-09","lts":false,"security":false},{"name":"nodejs","version":"17.8.0","date":"2022-03-22","lts":false,"security":false},{"name":"nodejs","version":"17.9.0","date":"2022-04-07","lts":false,"security":false},{"name":"nodejs","version":"18.0.0","date":"2022-04-18","lts":false,"security":false},{"name":"nodejs","version":"18.1.0","date":"2022-05-03","lts":false,"security":false},{"name":"nodejs","version":"18.2.0","date":"2022-05-17","lts":false,"security":false},{"name":"nodejs","version":"18.3.0","date":"2022-06-02","lts":false,"security":false},{"name":"nodejs","version":"18.4.0","date":"2022-06-16","lts":false,"security":false},{"name":"nodejs","version":"18.5.0","date":"2022-07-06","lts":false,"security":true},{"name":"nodejs","version":"18.6.0","date":"2022-07-13","lts":false,"security":false},{"name":"nodejs","version":"18.7.0","date":"2022-07-26","lts":false,"security":false},{"name":"nodejs","version":"18.8.0","date":"2022-08-24","lts":false,"security":false},{"name":"nodejs","version":"18.9.0","date":"2022-09-07","lts":false,"security":false},{"name":"nodejs","version":"18.10.0","date":"2022-09-28","lts":false,"security":false},{"name":"nodejs","version":"18.11.0","date":"2022-10-13","lts":false,"security":false},{"name":"nodejs","version":"18.12.0","date":"2022-10-25","lts":"Hydrogen","security":false},{"name":"nodejs","version":"18.13.0","date":"2023-01-05","lts":"Hydrogen","security":false},{"name":"nodejs","version":"18.14.0","date":"2023-02-01","lts":"Hydrogen","security":false},{"name":"nodejs","version":"19.0.0","date":"2022-10-17","lts":false,"security":false},{"name":"nodejs","version":"19.1.0","date":"2022-11-14","lts":false,"security":false},{"name":"nodejs","version":"19.2.0","date":"2022-11-29","lts":false,"security":false},{"name":"nodejs","version":"19.3.0","date":"2022-12-14","lts":false,"security":false},{"name":"nodejs","version":"19.4.0","date":"2023-01-05","lts":false,"security":false},{"name":"nodejs","version":"19.5.0","date":"2023-01-24","lts":false,"security":false},{"name":"nodejs","version":"19.6.0","date":"2023-02-01","lts":false,"security":false}] \ No newline at end of file diff --git a/node_modules/node-releases/package.json b/node_modules/node-releases/package.json index 8c91ca802..402859838 100644 --- a/node_modules/node-releases/package.json +++ b/node_modules/node-releases/package.json @@ -1,6 +1,6 @@ { "name": "node-releases", - "version": "2.0.8", + "version": "2.0.10", "description": "Node.js releases data", "scripts": { "build": "node scripts/build.js" diff --git a/node_modules/pretty-format/LICENSE b/node_modules/pretty-format/LICENSE index b96dcb048..b93be9051 100644 --- a/node_modules/pretty-format/LICENSE +++ b/node_modules/pretty-format/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) Meta Platforms, Inc. and affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/pretty-format/build/collections.js b/node_modules/pretty-format/build/collections.js index ff06289a5..a8b846fe5 100644 --- a/node_modules/pretty-format/build/collections.js +++ b/node_modules/pretty-format/build/collections.js @@ -8,7 +8,7 @@ exports.printIteratorValues = printIteratorValues; exports.printListItems = printListItems; exports.printObjectProperties = printObjectProperties; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/index.d.ts b/node_modules/pretty-format/build/index.d.ts index 58c47e263..8eac03494 100644 --- a/node_modules/pretty-format/build/index.d.ts +++ b/node_modules/pretty-format/build/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/index.js b/node_modules/pretty-format/build/index.js index f2c7a07bd..8d3a56294 100644 --- a/node_modules/pretty-format/build/index.js +++ b/node_modules/pretty-format/build/index.js @@ -22,7 +22,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/plugins/DOMCollection.js b/node_modules/pretty-format/build/plugins/DOMCollection.js index eba125adc..7b495b9a5 100644 --- a/node_modules/pretty-format/build/plugins/DOMCollection.js +++ b/node_modules/pretty-format/build/plugins/DOMCollection.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.test = exports.serialize = exports.default = void 0; var _collections = require('../collections'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/plugins/DOMElement.js b/node_modules/pretty-format/build/plugins/DOMElement.js index e45b0006e..a8ee2bb9b 100644 --- a/node_modules/pretty-format/build/plugins/DOMElement.js +++ b/node_modules/pretty-format/build/plugins/DOMElement.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.test = exports.serialize = exports.default = void 0; var _markup = require('./lib/markup'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/plugins/Immutable.js b/node_modules/pretty-format/build/plugins/Immutable.js index fad603283..14f56561d 100644 --- a/node_modules/pretty-format/build/plugins/Immutable.js +++ b/node_modules/pretty-format/build/plugins/Immutable.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { exports.test = exports.serialize = exports.default = void 0; var _collections = require('../collections'); /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/plugins/ReactElement.js b/node_modules/pretty-format/build/plugins/ReactElement.js index 454cd667d..1db3bc7c3 100644 --- a/node_modules/pretty-format/build/plugins/ReactElement.js +++ b/node_modules/pretty-format/build/plugins/ReactElement.js @@ -47,7 +47,7 @@ function _interopRequireWildcard(obj, nodeInterop) { return newObj; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/plugins/lib/escapeHTML.js b/node_modules/pretty-format/build/plugins/lib/escapeHTML.js index f4cc55fdc..8b454299b 100644 --- a/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +++ b/node_modules/pretty-format/build/plugins/lib/escapeHTML.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { }); exports.default = escapeHTML; /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/build/plugins/lib/markup.js b/node_modules/pretty-format/build/plugins/lib/markup.js index 53e40b426..dae3bc4ad 100644 --- a/node_modules/pretty-format/build/plugins/lib/markup.js +++ b/node_modules/pretty-format/build/plugins/lib/markup.js @@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/node_modules/pretty-format/package.json b/node_modules/pretty-format/package.json index e020b4c4f..fe104a556 100644 --- a/node_modules/pretty-format/package.json +++ b/node_modules/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "29.4.1", + "version": "29.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,7 +19,7 @@ }, "author": "James Kyle ", "dependencies": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -28,7 +28,7 @@ "@types/react-is": "^17.0.0", "@types/react-test-renderer": "17.0.2", "immutable": "^4.0.0", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "react": "17.0.2", "react-dom": "^17.0.1", "react-test-renderer": "17.0.2" @@ -39,5 +39,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" + "gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c" } diff --git a/node_modules/pure-rand/CHANGELOG.md b/node_modules/pure-rand/CHANGELOG.md new file mode 100644 index 000000000..817c83a0b --- /dev/null +++ b/node_modules/pure-rand/CHANGELOG.md @@ -0,0 +1,60 @@ +# CHANGELOG 6.X + +## 6.0.1 + +### Fixes + +- [05421f2](https://github.com/dubzzz/pure-rand/commit/05421f2) 🚨 Reformat README.md (#563) +- [ffacfbd](https://github.com/dubzzz/pure-rand/commit/ffacfbd) 📝 Give simple seed computation example (#562) +- [e432d59](https://github.com/dubzzz/pure-rand/commit/e432d59) 📝 Add extra keywords (#561) +- [f5b18d4](https://github.com/dubzzz/pure-rand/commit/f5b18d4) 🐛 Declare types first for package (#560) +- [a5b30db](https://github.com/dubzzz/pure-rand/commit/a5b30db) 📝 Final clean-up of the README (#559) +- [5254ee0](https://github.com/dubzzz/pure-rand/commit/5254ee0) 📝 Fix simple examples not fully working (#558) +- [8daf460](https://github.com/dubzzz/pure-rand/commit/8daf460) 📝 Clarify the README (#556) +- [a915b6a](https://github.com/dubzzz/pure-rand/commit/a915b6a) 📝 Fix url error in README for logo (#554) +- [f94885c](https://github.com/dubzzz/pure-rand/commit/f94885c) 📝 Rework README header with logo (#553) +- [5f7645e](https://github.com/dubzzz/pure-rand/commit/5f7645e) 📝 Typo in link to comparison SVG (#551) +- [61726af](https://github.com/dubzzz/pure-rand/commit/61726af) 📝 Better keywords for NPM (#550) +- [6001e5a](https://github.com/dubzzz/pure-rand/commit/6001e5a) 📝 Update performance section with recent stats (#549) +- [556ec33](https://github.com/dubzzz/pure-rand/commit/556ec33) ⚗️ Rewrite not uniform of pure-rand (#547) +- [b3dfea5](https://github.com/dubzzz/pure-rand/commit/b3dfea5) ⚗️ Add more libraries to the experiment (#546) +- [ac8b85d](https://github.com/dubzzz/pure-rand/commit/ac8b85d) ⚗️ Add some more non-uniform versions (#543) +- [44af2ad](https://github.com/dubzzz/pure-rand/commit/44af2ad) ⚗️ Add some more self comparisons (#542) +- [6d3342d](https://github.com/dubzzz/pure-rand/commit/6d3342d) 📝 Add some more details on the algorithms in compare (#541) +- [359e214](https://github.com/dubzzz/pure-rand/commit/359e214) 📝 Fix some typos in README (#540) +- [28a7bfe](https://github.com/dubzzz/pure-rand/commit/28a7bfe) 📝 Document some performance stats (#539) +- [81860b7](https://github.com/dubzzz/pure-rand/commit/81860b7) ⚗️ Measure performance against other libraries (#538) +- [114c2c7](https://github.com/dubzzz/pure-rand/commit/114c2c7) 📝 Publish changelogs from 3.X to 6.X (#537) + +## 6.0.0 + +### Breaking Changes + +- [c45912f](https://github.com/dubzzz/pure-rand/commit/c45912f) 💥 Require generators uniform in int32 (#513) +- [0bde03e](https://github.com/dubzzz/pure-rand/commit/0bde03e) 💥 Drop congruencial generator (#511) + +### Features + +- [7587984](https://github.com/dubzzz/pure-rand/commit/7587984) ⚡️ Faster uniform distribution on bigint (#517) +- [464960a](https://github.com/dubzzz/pure-rand/commit/464960a) ⚡️ Faster uniform distribution on small ranges (#516) +- [b4852a8](https://github.com/dubzzz/pure-rand/commit/b4852a8) ⚡️ Faster Congruencial 32bits (#512) +- [fdb6ec8](https://github.com/dubzzz/pure-rand/commit/fdb6ec8) ⚡️ Faster Mersenne-Twister (#510) +- [bb69be5](https://github.com/dubzzz/pure-rand/commit/bb69be5) ⚡️ Drop infinite loop for explicit loop (#507) + +### Fixes + +- [00fc62b](https://github.com/dubzzz/pure-rand/commit/00fc62b) 🔨 Add missing benchType to the script (#522) +- [db4a0a6](https://github.com/dubzzz/pure-rand/commit/db4a0a6) 🔨 Add more options to benchmark (#521) +- [5c1ca0e](https://github.com/dubzzz/pure-rand/commit/5c1ca0e) 🔨 Fix typo in benchmark code (#520) +- [36c965f](https://github.com/dubzzz/pure-rand/commit/36c965f) 👷 Define a benchmark workflow (#519) +- [0281cfd](https://github.com/dubzzz/pure-rand/commit/0281cfd) 🔨 More customizable benchmark (#518) +- [a7e19a8](https://github.com/dubzzz/pure-rand/commit/a7e19a8) 🔥 Clean internals of uniform distribution (#515) +- [520cca7](https://github.com/dubzzz/pure-rand/commit/520cca7) 🔨 Add some more benchmarks (#514) +- [c2d6ee6](https://github.com/dubzzz/pure-rand/commit/c2d6ee6) 🔨 Fix typo in bench for large reference (#509) +- [2dd7280](https://github.com/dubzzz/pure-rand/commit/2dd7280) 🔥 Clean useless variable (#506) +- [dd621c9](https://github.com/dubzzz/pure-rand/commit/dd621c9) 🔨 Adapt benchmarks to make them reliable (#505) +- [122f968](https://github.com/dubzzz/pure-rand/commit/122f968) 👷 Drop dependabot +- [f11d2e8](https://github.com/dubzzz/pure-rand/commit/f11d2e8) 💸 Add GitHub sponsors in repository's configuration +- [6a23e48](https://github.com/dubzzz/pure-rand/commit/6a23e48) 👷 Stop running tests against node 12 (#486) +- [cbefd3e](https://github.com/dubzzz/pure-rand/commit/cbefd3e) 🔧 Better configuration of prettier (#474) +- [c6712d3](https://github.com/dubzzz/pure-rand/commit/c6712d3) 🔧 Configure Renovate (#470) diff --git a/node_modules/pure-rand/LICENSE b/node_modules/pure-rand/LICENSE new file mode 100644 index 000000000..7f3e3558f --- /dev/null +++ b/node_modules/pure-rand/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Nicolas DUBIEN + +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. diff --git a/node_modules/pure-rand/README.md b/node_modules/pure-rand/README.md new file mode 100644 index 000000000..f0f86f1c6 --- /dev/null +++ b/node_modules/pure-rand/README.md @@ -0,0 +1,208 @@ +

+ pure-rand logo +

+ +Fast Pseudorandom number generators (aka PRNG) with purity in mind! + +[![Build Status](https://github.com/dubzzz/pure-rand/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/dubzzz/pure-rand/actions) +[![NPM Version](https://badge.fury.io/js/pure-rand.svg)](https://badge.fury.io/js/pure-rand) +[![Monthly Downloads](https://img.shields.io/npm/dm/pure-rand)](https://www.npmjs.com/package/pure-rand) + +[![Codecov](https://codecov.io/gh/dubzzz/pure-rand/branch/main/graph/badge.svg)](https://codecov.io/gh/dubzzz/pure-rand) +[![Package Quality](https://packagequality.com/shield/pure-rand.svg)](https://packagequality.com/#?package=pure-rand) +[![Snyk Package Quality](https://snyk.io/advisor/npm-package/pure-rand/badge.svg)](https://snyk.io/advisor/npm-package/pure-rand) + +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dubzzz/pure-rand/labels/good%20first%20issue) +[![License](https://img.shields.io/npm/l/pure-rand.svg)](https://github.com/dubzzz/pure-rand/blob/main/LICENSE) +[![Twitter](https://img.shields.io/twitter/url/https/github.com/dubzzz/pure-rand.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20pure-rand%20by%20%40ndubien%20https%3A%2F%2Fgithub.com%2Fdubzzz%2Fpure-rand%20%F0%9F%91%8D) + +## Getting started + +**Install it in node via:** + +`npm install pure-rand` or `yarn add pure-rand` + +**Use it in browser by doing:** + +`import * as prand from 'https://unpkg.com/pure-rand/lib/esm/pure-rand.js';` + +## Usage + +**Simple usage** + +```javascript +import prand from 'pure-rand'; + +const seed = 42; +const rng = prand.xoroshiro128plus(seed); +const firstDiceValue = prand.unsafeUniformIntDistribution(1, 6, rng); // value in {1..6}, here: 2 +const secondDiceValue = prand.unsafeUniformIntDistribution(1, 6, rng); // value in {1..6}, here: 4 +const thirdDiceValue = prand.unsafeUniformIntDistribution(1, 6, rng); // value in {1..6}, here: 6 +``` + +**Pure usage** + +Pure means that the instance `rng` will never be altered in-place. It can be called again and again and it will always return the same value. But it will also return the next `rng`. Here is an example showing how the code above can be translated into its pure version: + +```javascript +import prand from 'pure-rand'; + +const seed = 42; +const rng1 = prand.xoroshiro128plus(seed); +const [firstDiceValue, rng2] = prand.uniformIntDistribution(1, 6, rng1); // value in {1..6}, here: 2 +const [secondDiceValue, rng3] = prand.uniformIntDistribution(1, 6, rng2); // value in {1..6}, here: 4 +const [thirdDiceValue, rng4] = prand.uniformIntDistribution(1, 6, rng3); // value in {1..6}, here: 6 + +// You can call: prand.uniformIntDistribution(1, 6, rng1); +// over and over it will always give you back the same value along with a new rng (always producing the same values too). +``` + +**Independent simulations** + +In order to produce independent simulations it can be tempting to instanciate several PRNG based on totally different seeds. While it would produce distinct set of values, the best way to ensure fully unrelated sequences is rather to use jumps. Jump just consists into moving far away from the current position in the generator (eg.: jumping in Xoroshiro 128+ will move you 264 generations away from the current one on a generator having a sequence of 2128 elements). + +```javascript +import prand from 'pure-rand'; + +const seed = 42; +const rngSimulation1 = prand.xoroshiro128plus(seed); +const rngSimulation2 = rngSimulation1.jump(); // not in-place, creates a new instance +const rngSimulation3 = rngSimulation2.jump(); // not in-place, creates a new instance + +const diceSim1Value = prand.unsafeUniformIntDistribution(1, 6, rngSimulation1); // value in {1..6}, here: 2 +const diceSim2Value = prand.unsafeUniformIntDistribution(1, 6, rngSimulation2); // value in {1..6}, here: 5 +const diceSim3Value = prand.unsafeUniformIntDistribution(1, 6, rngSimulation3); // value in {1..6}, here: 6 +``` + +**Non-uniform usage** + +While not recommended as non-uniform distribution implies that one or several values from the range will be more likely than others, it might be tempting for people wanting to maximize the throughput. + +```javascript +import prand from 'pure-rand'; + +const seed = 42; +const rng = prand.xoroshiro128plus(seed); +const rand = (min, max) => { + const out = (rng.unsafeNext() >>> 0) / 0x100000000; + return min + Math.floor(out * (max - min + 1)); +}; +const firstDiceValue = rand(1, 6); // value in {1..6}, here: 6 +``` + +**Select your seed** + +While not perfect, here is a rather simple way to generate a seed for your PNRG. + +```javascript +const seed = Date.now() ^ (Math.random() * 0x100000000); +``` + +## Documentation + +### Pseudorandom number generators + +In computer science most random number generators(1) are [pseudorandom number generators](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) (abbreviated: PRNG). In other words, they are fully deterministic and given the original seed one can rebuild the whole sequence. + +Each PRNG algorithm has to deal with tradeoffs in terms of randomness quality, speed, length of the sequence(2)... In other words, it's important to compare relative speed of libraries with that in mind. Indeed, a Mersenne Twister PRNG will not have the same strenghts and weaknesses as a Xoroshiro PRNG, so depending on what you need exactly you might prefer one PRNG over another even if it will be slower. + +4 PRNGs come with pure-rand: + +- `congruential32`: Linear Congruential generator — \[[more](https://en.wikipedia.org/wiki/Linear_congruential_generator)\] +- `mersenne`: Mersenne Twister generator — \[[more](https://en.wikipedia.org/wiki/Mersenne_Twister)\] +- `xorshift128plus`: Xorshift 128+ generator — \[[more](https://en.wikipedia.org/wiki/Xorshift)\] +- `xoroshiro128plus`: Xoroshiro 128+ generator — \[[more](https://en.wikipedia.org/wiki/Xorshift)\] + +Our recommendation is `xoroshiro128plus`. But if you want to use another one, you can replace it by any other PRNG provided by pure-rand in the examples above. + +### Distributions + +Once you are able to generate random values, next step is to scale them into the range you want. Indeed, you probably don't want a floating point value between 0 (included) and 1 (excluded) but rather an integer value between 1 and 6 if you emulate a dice or any other range based on your needs. + +At this point, simple way would be to do `min + floor(random() * (max - min + 1))` but actually it will not generate the values with equal probabilities even if you use the best PRNG in the world to back `random()`. In order to have equal probabilities you need to rely on uniform distributions(3) which comes built-in in some PNRG libraries. + +pure-rand provides 3 built-in functions for uniform distributions of values: + +- `uniformIntDistribution(min, max, rng)` +- `uniformBigIntDistribution(min, max, rng)` - with `min` and `max` being `bigint` +- `uniformArrayIntDistribution(min, max, rng)` - with `min` and `max` being instances of `ArrayInt = {sign, data}` ie. sign either 1 or -1 and data an array of numbers between 0 (included) and 0xffffffff (included) + +And their unsafe equivalents to change the PRNG in-place. + +### Extra helpers + +Some helpers are also provided in order to ease the use of `RandomGenerator` instances: + +- `prand.generateN(rng: RandomGenerator, num: number): [number[], RandomGenerator]`: generates `num` random values using `rng` and return the next `RandomGenerator` +- `prand.skipN(rng: RandomGenerator, num: number): RandomGenerator`: skips `num` random values and return the next `RandomGenerator` + +## Comparison + +### Summary + +The chart has been split into three sections: + +- section 1: native `Math.random()` +- section 2: without uniform distribution of values +- section 3: with uniform distribution of values (not supported by all libraries) + +Comparison against other libraries + +### Process + +In order to compare the performance of the libraries, we aked them to shuffle an array containing 1,000,000 items (see [code](https://github.com/dubzzz/pure-rand/blob/556ec331c68091c5d56e9da1266112e8ea222b2e/perf/compare.cjs)). + +We then split the measurements into two sections: + +- one for non-uniform distributions — _known to be slower as it implies re-asking for other values to the PRNG until the produced value fall into the acceptable range of values_ +- one for uniform distributions + +The recommended setup for pure-rand is to rely on our Xoroshiro128+. It provides a long enough sequence of random values, has built-in support for jump, is really efficient while providing a very good quality of randomness. + +### Performance + +**Non-Uniform** + +| Library | Algorithm | Mean time (ms) | Compared to pure-rand | +| ------------------------ | ----------------- | -------------- | --------------------- | +| native \(node 16.19.1\) | Xorshift128+ | 33.3 | 1.4x slower | +| **pure-rand _@6.0.0_** | **Xoroshiro128+** | **24.5** | **reference** | +| pure-rand _@6.0.0_ | Xorshift128+ | 25.0 | similar | +| pure-rand _@6.0.0_ | Mersenne Twister | 30.8 | 1.3x slower | +| pure-rand _@6.0.0_ | Congruential‍ | 22.6 | 1.1x faster | +| seedrandom _@3.0.5_ | Alea | 28.1 | 1.1x slower | +| seedrandom _@3.0.5_ | Xorshift128 | 28.8 | 1.2x slower | +| seedrandom _@3.0.5_ | Tyche-i | 28.6 | 1.2x slower | +| seedrandom _@3.0.5_ | Xorwow | 32.0 | 1.3x slower | +| seedrandom _@3.0.5_ | Xor4096 | 32.2 | 1.3x slower | +| seedrandom _@3.0.5_ | Xorshift7 | 33.5 | 1.4x slower | +| @faker-js/faker _@7.6.0_ | Mersenne Twister | 109.1 | 4.5x slower | +| chance _@1.1.10_ | Mersenne Twister | 142.9 | 5.8x slower | + +**Uniform** + +| Library | Algorithm | Mean time (ms) | Compared to pure-rand | +| ---------------------- | ----------------- | -------------- | --------------------- | +| **pure-rand _@6.0.0_** | **Xoroshiro128+** | **53.5** | **reference** | +| pure-rand _@6.0.0_ | Xorshift128+ | 52.2 | similar | +| pure-rand _@6.0.0_ | Mersenne Twister | 61.6 | 1.2x slower | +| pure-rand _@6.0.0_ | Congruential‍ | 57.6 | 1.1x slower | +| random-js @2.1.0 | Mersenne Twister | 119.6 | 2.2x slower | + +> System details: +> +> - OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish) +> - CPU: (2) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz +> - Memory: 5.88 GB / 6.78 GB +> - Container: Yes +> - Node: 16.19.1 - /opt/hostedtoolcache/node/16.19.1/x64/bin/node +> +> _Executed on default runners provided by GitHub Actions_ + +--- + +(1) — Not all as there are also [hardware-based random number generator](https://en.wikipedia.org/wiki/Hardware_random_number_generator). + +(2) — How long it takes to reapeat itself? + +(3) — While most users don't really think of it, uniform distribution is key! Without it entries might be biased towards some values and make some others less probable. The naive `rand() % numValues` is a good example of biased version as if `rand()` is uniform in `0, 1, 2` and `numValues` is `2`, the probabilities are: `P(0) = 67%`, `P(1) = 33%` causing `1` to be less probable than `0` diff --git a/node_modules/pure-rand/lib/distribution/Distribution.js b/node_modules/pure-rand/lib/distribution/Distribution.js new file mode 100644 index 000000000..0e345787d --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/Distribution.js @@ -0,0 +1,2 @@ +"use strict"; +exports.__esModule = true; diff --git a/node_modules/pure-rand/lib/distribution/UniformArrayIntDistribution.js b/node_modules/pure-rand/lib/distribution/UniformArrayIntDistribution.js new file mode 100644 index 000000000..b7fcb0ff0 --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/UniformArrayIntDistribution.js @@ -0,0 +1,15 @@ +"use strict"; +exports.__esModule = true; +exports.uniformArrayIntDistribution = void 0; +var UnsafeUniformArrayIntDistribution_1 = require("./UnsafeUniformArrayIntDistribution"); +function uniformArrayIntDistribution(from, to, rng) { + if (rng != null) { + var nextRng = rng.clone(); + return [(0, UnsafeUniformArrayIntDistribution_1.unsafeUniformArrayIntDistribution)(from, to, nextRng), nextRng]; + } + return function (rng) { + var nextRng = rng.clone(); + return [(0, UnsafeUniformArrayIntDistribution_1.unsafeUniformArrayIntDistribution)(from, to, nextRng), nextRng]; + }; +} +exports.uniformArrayIntDistribution = uniformArrayIntDistribution; diff --git a/node_modules/pure-rand/lib/distribution/UniformBigIntDistribution.js b/node_modules/pure-rand/lib/distribution/UniformBigIntDistribution.js new file mode 100644 index 000000000..9badcab66 --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/UniformBigIntDistribution.js @@ -0,0 +1,15 @@ +"use strict"; +exports.__esModule = true; +exports.uniformBigIntDistribution = void 0; +var UnsafeUniformBigIntDistribution_1 = require("./UnsafeUniformBigIntDistribution"); +function uniformBigIntDistribution(from, to, rng) { + if (rng != null) { + var nextRng = rng.clone(); + return [(0, UnsafeUniformBigIntDistribution_1.unsafeUniformBigIntDistribution)(from, to, nextRng), nextRng]; + } + return function (rng) { + var nextRng = rng.clone(); + return [(0, UnsafeUniformBigIntDistribution_1.unsafeUniformBigIntDistribution)(from, to, nextRng), nextRng]; + }; +} +exports.uniformBigIntDistribution = uniformBigIntDistribution; diff --git a/node_modules/pure-rand/lib/distribution/UniformIntDistribution.js b/node_modules/pure-rand/lib/distribution/UniformIntDistribution.js new file mode 100644 index 000000000..2c6cfd23d --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/UniformIntDistribution.js @@ -0,0 +1,15 @@ +"use strict"; +exports.__esModule = true; +exports.uniformIntDistribution = void 0; +var UnsafeUniformIntDistribution_1 = require("./UnsafeUniformIntDistribution"); +function uniformIntDistribution(from, to, rng) { + if (rng != null) { + var nextRng = rng.clone(); + return [(0, UnsafeUniformIntDistribution_1.unsafeUniformIntDistribution)(from, to, nextRng), nextRng]; + } + return function (rng) { + var nextRng = rng.clone(); + return [(0, UnsafeUniformIntDistribution_1.unsafeUniformIntDistribution)(from, to, nextRng), nextRng]; + }; +} +exports.uniformIntDistribution = uniformIntDistribution; diff --git a/node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js b/node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js new file mode 100644 index 000000000..165641552 --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js @@ -0,0 +1,12 @@ +"use strict"; +exports.__esModule = true; +exports.unsafeUniformArrayIntDistribution = void 0; +var ArrayInt_1 = require("./internals/ArrayInt"); +var UnsafeUniformArrayIntDistributionInternal_1 = require("./internals/UnsafeUniformArrayIntDistributionInternal"); +function unsafeUniformArrayIntDistribution(from, to, rng) { + var rangeSize = (0, ArrayInt_1.trimArrayIntInplace)((0, ArrayInt_1.addOneToPositiveArrayInt)((0, ArrayInt_1.substractArrayIntToNew)(to, from))); + var emptyArrayIntData = rangeSize.data.slice(0); + var g = (0, UnsafeUniformArrayIntDistributionInternal_1.unsafeUniformArrayIntDistributionInternal)(emptyArrayIntData, rangeSize.data, rng); + return (0, ArrayInt_1.trimArrayIntInplace)((0, ArrayInt_1.addArrayIntToNew)({ sign: 1, data: g }, from)); +} +exports.unsafeUniformArrayIntDistribution = unsafeUniformArrayIntDistribution; diff --git a/node_modules/pure-rand/lib/distribution/UnsafeUniformBigIntDistribution.js b/node_modules/pure-rand/lib/distribution/UnsafeUniformBigIntDistribution.js new file mode 100644 index 000000000..093853a56 --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/UnsafeUniformBigIntDistribution.js @@ -0,0 +1,28 @@ +"use strict"; +exports.__esModule = true; +exports.unsafeUniformBigIntDistribution = void 0; +var SBigInt = typeof BigInt !== 'undefined' ? BigInt : undefined; +function unsafeUniformBigIntDistribution(from, to, rng) { + var diff = to - from + SBigInt(1); + var MinRng = SBigInt(-0x80000000); + var NumValues = SBigInt(0x100000000); + var FinalNumValues = NumValues; + var NumIterations = 1; + while (FinalNumValues < diff) { + FinalNumValues *= NumValues; + ++NumIterations; + } + var MaxAcceptedRandom = FinalNumValues - (FinalNumValues % diff); + while (true) { + var value = SBigInt(0); + for (var num = 0; num !== NumIterations; ++num) { + var out = rng.unsafeNext(); + value = NumValues * value + (SBigInt(out) - MinRng); + } + if (value < MaxAcceptedRandom) { + var inDiff = value % diff; + return inDiff + from; + } + } +} +exports.unsafeUniformBigIntDistribution = unsafeUniformBigIntDistribution; diff --git a/node_modules/pure-rand/lib/distribution/UnsafeUniformIntDistribution.js b/node_modules/pure-rand/lib/distribution/UnsafeUniformIntDistribution.js new file mode 100644 index 000000000..b63ac844e --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/UnsafeUniformIntDistribution.js @@ -0,0 +1,34 @@ +"use strict"; +exports.__esModule = true; +exports.unsafeUniformIntDistribution = void 0; +var UnsafeUniformIntDistributionInternal_1 = require("./internals/UnsafeUniformIntDistributionInternal"); +var ArrayInt_1 = require("./internals/ArrayInt"); +var UnsafeUniformArrayIntDistributionInternal_1 = require("./internals/UnsafeUniformArrayIntDistributionInternal"); +var safeNumberMaxSafeInteger = Number.MAX_SAFE_INTEGER; +var sharedA = { sign: 1, data: [0, 0] }; +var sharedB = { sign: 1, data: [0, 0] }; +var sharedC = { sign: 1, data: [0, 0] }; +var sharedData = [0, 0]; +function uniformLargeIntInternal(from, to, rangeSize, rng) { + var rangeSizeArrayIntValue = rangeSize <= safeNumberMaxSafeInteger + ? (0, ArrayInt_1.fromNumberToArrayInt64)(sharedC, rangeSize) + : (0, ArrayInt_1.substractArrayInt64)(sharedC, (0, ArrayInt_1.fromNumberToArrayInt64)(sharedA, to), (0, ArrayInt_1.fromNumberToArrayInt64)(sharedB, from)); + if (rangeSizeArrayIntValue.data[1] === 0xffffffff) { + rangeSizeArrayIntValue.data[0] += 1; + rangeSizeArrayIntValue.data[1] = 0; + } + else { + rangeSizeArrayIntValue.data[1] += 1; + } + (0, UnsafeUniformArrayIntDistributionInternal_1.unsafeUniformArrayIntDistributionInternal)(sharedData, rangeSizeArrayIntValue.data, rng); + return sharedData[0] * 0x100000000 + sharedData[1] + from; +} +function unsafeUniformIntDistribution(from, to, rng) { + var rangeSize = to - from; + if (rangeSize <= 0xffffffff) { + var g = (0, UnsafeUniformIntDistributionInternal_1.unsafeUniformIntDistributionInternal)(rangeSize + 1, rng); + return g + from; + } + return uniformLargeIntInternal(from, to, rangeSize, rng); +} +exports.unsafeUniformIntDistribution = unsafeUniformIntDistribution; diff --git a/node_modules/pure-rand/lib/distribution/internals/ArrayInt.js b/node_modules/pure-rand/lib/distribution/internals/ArrayInt.js new file mode 100644 index 000000000..7642228c1 --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/internals/ArrayInt.js @@ -0,0 +1,141 @@ +"use strict"; +exports.__esModule = true; +exports.substractArrayInt64 = exports.fromNumberToArrayInt64 = exports.trimArrayIntInplace = exports.substractArrayIntToNew = exports.addOneToPositiveArrayInt = exports.addArrayIntToNew = void 0; +function addArrayIntToNew(arrayIntA, arrayIntB) { + if (arrayIntA.sign !== arrayIntB.sign) { + return substractArrayIntToNew(arrayIntA, { sign: -arrayIntB.sign, data: arrayIntB.data }); + } + var data = []; + var reminder = 0; + var dataA = arrayIntA.data; + var dataB = arrayIntB.data; + for (var indexA = dataA.length - 1, indexB = dataB.length - 1; indexA >= 0 || indexB >= 0; --indexA, --indexB) { + var vA = indexA >= 0 ? dataA[indexA] : 0; + var vB = indexB >= 0 ? dataB[indexB] : 0; + var current = vA + vB + reminder; + data.push(current >>> 0); + reminder = ~~(current / 0x100000000); + } + if (reminder !== 0) { + data.push(reminder); + } + return { sign: arrayIntA.sign, data: data.reverse() }; +} +exports.addArrayIntToNew = addArrayIntToNew; +function addOneToPositiveArrayInt(arrayInt) { + arrayInt.sign = 1; + var data = arrayInt.data; + for (var index = data.length - 1; index >= 0; --index) { + if (data[index] === 0xffffffff) { + data[index] = 0; + } + else { + data[index] += 1; + return arrayInt; + } + } + data.unshift(1); + return arrayInt; +} +exports.addOneToPositiveArrayInt = addOneToPositiveArrayInt; +function isStrictlySmaller(dataA, dataB) { + var maxLength = Math.max(dataA.length, dataB.length); + for (var index = 0; index < maxLength; ++index) { + var indexA = index + dataA.length - maxLength; + var indexB = index + dataB.length - maxLength; + var vA = indexA >= 0 ? dataA[indexA] : 0; + var vB = indexB >= 0 ? dataB[indexB] : 0; + if (vA < vB) + return true; + if (vA > vB) + return false; + } + return false; +} +function substractArrayIntToNew(arrayIntA, arrayIntB) { + if (arrayIntA.sign !== arrayIntB.sign) { + return addArrayIntToNew(arrayIntA, { sign: -arrayIntB.sign, data: arrayIntB.data }); + } + var dataA = arrayIntA.data; + var dataB = arrayIntB.data; + if (isStrictlySmaller(dataA, dataB)) { + var out = substractArrayIntToNew(arrayIntB, arrayIntA); + out.sign = -out.sign; + return out; + } + var data = []; + var reminder = 0; + for (var indexA = dataA.length - 1, indexB = dataB.length - 1; indexA >= 0 || indexB >= 0; --indexA, --indexB) { + var vA = indexA >= 0 ? dataA[indexA] : 0; + var vB = indexB >= 0 ? dataB[indexB] : 0; + var current = vA - vB - reminder; + data.push(current >>> 0); + reminder = current < 0 ? 1 : 0; + } + return { sign: arrayIntA.sign, data: data.reverse() }; +} +exports.substractArrayIntToNew = substractArrayIntToNew; +function trimArrayIntInplace(arrayInt) { + var data = arrayInt.data; + var firstNonZero = 0; + for (; firstNonZero !== data.length && data[firstNonZero] === 0; ++firstNonZero) { } + if (firstNonZero === data.length) { + arrayInt.sign = 1; + arrayInt.data = [0]; + return arrayInt; + } + data.splice(0, firstNonZero); + return arrayInt; +} +exports.trimArrayIntInplace = trimArrayIntInplace; +function fromNumberToArrayInt64(out, n) { + if (n < 0) { + var posN = -n; + out.sign = -1; + out.data[0] = ~~(posN / 0x100000000); + out.data[1] = posN >>> 0; + } + else { + out.sign = 1; + out.data[0] = ~~(n / 0x100000000); + out.data[1] = n >>> 0; + } + return out; +} +exports.fromNumberToArrayInt64 = fromNumberToArrayInt64; +function substractArrayInt64(out, arrayIntA, arrayIntB) { + var lowA = arrayIntA.data[1]; + var highA = arrayIntA.data[0]; + var signA = arrayIntA.sign; + var lowB = arrayIntB.data[1]; + var highB = arrayIntB.data[0]; + var signB = arrayIntB.sign; + out.sign = 1; + if (signA === 1 && signB === -1) { + var low_1 = lowA + lowB; + var high = highA + highB + (low_1 > 0xffffffff ? 1 : 0); + out.data[0] = high >>> 0; + out.data[1] = low_1 >>> 0; + return out; + } + var lowFirst = lowA; + var highFirst = highA; + var lowSecond = lowB; + var highSecond = highB; + if (signA === -1) { + lowFirst = lowB; + highFirst = highB; + lowSecond = lowA; + highSecond = highA; + } + var reminderLow = 0; + var low = lowFirst - lowSecond; + if (low < 0) { + reminderLow = 1; + low = low >>> 0; + } + out.data[0] = highFirst - highSecond - reminderLow; + out.data[1] = low; + return out; +} +exports.substractArrayInt64 = substractArrayInt64; diff --git a/node_modules/pure-rand/lib/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js b/node_modules/pure-rand/lib/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js new file mode 100644 index 000000000..266f9fc0c --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js @@ -0,0 +1,25 @@ +"use strict"; +exports.__esModule = true; +exports.unsafeUniformArrayIntDistributionInternal = void 0; +var UnsafeUniformIntDistributionInternal_1 = require("./UnsafeUniformIntDistributionInternal"); +function unsafeUniformArrayIntDistributionInternal(out, rangeSize, rng) { + var rangeLength = rangeSize.length; + while (true) { + for (var index = 0; index !== rangeLength; ++index) { + var indexRangeSize = index === 0 ? rangeSize[0] + 1 : 0x100000000; + var g = (0, UnsafeUniformIntDistributionInternal_1.unsafeUniformIntDistributionInternal)(indexRangeSize, rng); + out[index] = g; + } + for (var index = 0; index !== rangeLength; ++index) { + var current = out[index]; + var currentInRange = rangeSize[index]; + if (current < currentInRange) { + return out; + } + else if (current > currentInRange) { + break; + } + } + } +} +exports.unsafeUniformArrayIntDistributionInternal = unsafeUniformArrayIntDistributionInternal; diff --git a/node_modules/pure-rand/lib/distribution/internals/UnsafeUniformIntDistributionInternal.js b/node_modules/pure-rand/lib/distribution/internals/UnsafeUniformIntDistributionInternal.js new file mode 100644 index 000000000..ee2cca86f --- /dev/null +++ b/node_modules/pure-rand/lib/distribution/internals/UnsafeUniformIntDistributionInternal.js @@ -0,0 +1,12 @@ +"use strict"; +exports.__esModule = true; +exports.unsafeUniformIntDistributionInternal = void 0; +function unsafeUniformIntDistributionInternal(rangeSize, rng) { + var MaxAllowed = rangeSize > 2 ? ~~(0x100000000 / rangeSize) * rangeSize : 0x100000000; + var deltaV = rng.unsafeNext() + 0x80000000; + while (deltaV >= MaxAllowed) { + deltaV = rng.unsafeNext() + 0x80000000; + } + return deltaV % rangeSize; +} +exports.unsafeUniformIntDistributionInternal = unsafeUniformIntDistributionInternal; diff --git a/node_modules/pure-rand/lib/esm/distribution/Distribution.js b/node_modules/pure-rand/lib/esm/distribution/Distribution.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/Distribution.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js b/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js new file mode 100644 index 000000000..b17e6b02b --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js @@ -0,0 +1,12 @@ +import { unsafeUniformArrayIntDistribution } from './UnsafeUniformArrayIntDistribution.js'; +function uniformArrayIntDistribution(from, to, rng) { + if (rng != null) { + var nextRng = rng.clone(); + return [unsafeUniformArrayIntDistribution(from, to, nextRng), nextRng]; + } + return function (rng) { + var nextRng = rng.clone(); + return [unsafeUniformArrayIntDistribution(from, to, nextRng), nextRng]; + }; +} +export { uniformArrayIntDistribution }; diff --git a/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js b/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js new file mode 100644 index 000000000..0c59e5098 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js @@ -0,0 +1,12 @@ +import { unsafeUniformBigIntDistribution } from './UnsafeUniformBigIntDistribution.js'; +function uniformBigIntDistribution(from, to, rng) { + if (rng != null) { + var nextRng = rng.clone(); + return [unsafeUniformBigIntDistribution(from, to, nextRng), nextRng]; + } + return function (rng) { + var nextRng = rng.clone(); + return [unsafeUniformBigIntDistribution(from, to, nextRng), nextRng]; + }; +} +export { uniformBigIntDistribution }; diff --git a/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js b/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js new file mode 100644 index 000000000..3ee3df44f --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js @@ -0,0 +1,12 @@ +import { unsafeUniformIntDistribution } from './UnsafeUniformIntDistribution.js'; +function uniformIntDistribution(from, to, rng) { + if (rng != null) { + var nextRng = rng.clone(); + return [unsafeUniformIntDistribution(from, to, nextRng), nextRng]; + } + return function (rng) { + var nextRng = rng.clone(); + return [unsafeUniformIntDistribution(from, to, nextRng), nextRng]; + }; +} +export { uniformIntDistribution }; diff --git a/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js b/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js new file mode 100644 index 000000000..8cedbee65 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js @@ -0,0 +1,8 @@ +import { addArrayIntToNew, addOneToPositiveArrayInt, substractArrayIntToNew, trimArrayIntInplace, } from './internals/ArrayInt.js'; +import { unsafeUniformArrayIntDistributionInternal } from './internals/UnsafeUniformArrayIntDistributionInternal.js'; +export function unsafeUniformArrayIntDistribution(from, to, rng) { + var rangeSize = trimArrayIntInplace(addOneToPositiveArrayInt(substractArrayIntToNew(to, from))); + var emptyArrayIntData = rangeSize.data.slice(0); + var g = unsafeUniformArrayIntDistributionInternal(emptyArrayIntData, rangeSize.data, rng); + return trimArrayIntInplace(addArrayIntToNew({ sign: 1, data: g }, from)); +} diff --git a/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js b/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js new file mode 100644 index 000000000..2f8bfbd1f --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js @@ -0,0 +1,24 @@ +var SBigInt = typeof BigInt !== 'undefined' ? BigInt : undefined; +export function unsafeUniformBigIntDistribution(from, to, rng) { + var diff = to - from + SBigInt(1); + var MinRng = SBigInt(-0x80000000); + var NumValues = SBigInt(0x100000000); + var FinalNumValues = NumValues; + var NumIterations = 1; + while (FinalNumValues < diff) { + FinalNumValues *= NumValues; + ++NumIterations; + } + var MaxAcceptedRandom = FinalNumValues - (FinalNumValues % diff); + while (true) { + var value = SBigInt(0); + for (var num = 0; num !== NumIterations; ++num) { + var out = rng.unsafeNext(); + value = NumValues * value + (SBigInt(out) - MinRng); + } + if (value < MaxAcceptedRandom) { + var inDiff = value % diff; + return inDiff + from; + } + } +} diff --git a/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js b/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js new file mode 100644 index 000000000..4b98165ae --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js @@ -0,0 +1,30 @@ +import { unsafeUniformIntDistributionInternal } from './internals/UnsafeUniformIntDistributionInternal.js'; +import { fromNumberToArrayInt64, substractArrayInt64 } from './internals/ArrayInt.js'; +import { unsafeUniformArrayIntDistributionInternal } from './internals/UnsafeUniformArrayIntDistributionInternal.js'; +var safeNumberMaxSafeInteger = Number.MAX_SAFE_INTEGER; +var sharedA = { sign: 1, data: [0, 0] }; +var sharedB = { sign: 1, data: [0, 0] }; +var sharedC = { sign: 1, data: [0, 0] }; +var sharedData = [0, 0]; +function uniformLargeIntInternal(from, to, rangeSize, rng) { + var rangeSizeArrayIntValue = rangeSize <= safeNumberMaxSafeInteger + ? fromNumberToArrayInt64(sharedC, rangeSize) + : substractArrayInt64(sharedC, fromNumberToArrayInt64(sharedA, to), fromNumberToArrayInt64(sharedB, from)); + if (rangeSizeArrayIntValue.data[1] === 0xffffffff) { + rangeSizeArrayIntValue.data[0] += 1; + rangeSizeArrayIntValue.data[1] = 0; + } + else { + rangeSizeArrayIntValue.data[1] += 1; + } + unsafeUniformArrayIntDistributionInternal(sharedData, rangeSizeArrayIntValue.data, rng); + return sharedData[0] * 0x100000000 + sharedData[1] + from; +} +export function unsafeUniformIntDistribution(from, to, rng) { + var rangeSize = to - from; + if (rangeSize <= 0xffffffff) { + var g = unsafeUniformIntDistributionInternal(rangeSize + 1, rng); + return g + from; + } + return uniformLargeIntInternal(from, to, rangeSize, rng); +} diff --git a/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js b/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js new file mode 100644 index 000000000..2ef91b354 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js @@ -0,0 +1,132 @@ +export function addArrayIntToNew(arrayIntA, arrayIntB) { + if (arrayIntA.sign !== arrayIntB.sign) { + return substractArrayIntToNew(arrayIntA, { sign: -arrayIntB.sign, data: arrayIntB.data }); + } + var data = []; + var reminder = 0; + var dataA = arrayIntA.data; + var dataB = arrayIntB.data; + for (var indexA = dataA.length - 1, indexB = dataB.length - 1; indexA >= 0 || indexB >= 0; --indexA, --indexB) { + var vA = indexA >= 0 ? dataA[indexA] : 0; + var vB = indexB >= 0 ? dataB[indexB] : 0; + var current = vA + vB + reminder; + data.push(current >>> 0); + reminder = ~~(current / 0x100000000); + } + if (reminder !== 0) { + data.push(reminder); + } + return { sign: arrayIntA.sign, data: data.reverse() }; +} +export function addOneToPositiveArrayInt(arrayInt) { + arrayInt.sign = 1; + var data = arrayInt.data; + for (var index = data.length - 1; index >= 0; --index) { + if (data[index] === 0xffffffff) { + data[index] = 0; + } + else { + data[index] += 1; + return arrayInt; + } + } + data.unshift(1); + return arrayInt; +} +function isStrictlySmaller(dataA, dataB) { + var maxLength = Math.max(dataA.length, dataB.length); + for (var index = 0; index < maxLength; ++index) { + var indexA = index + dataA.length - maxLength; + var indexB = index + dataB.length - maxLength; + var vA = indexA >= 0 ? dataA[indexA] : 0; + var vB = indexB >= 0 ? dataB[indexB] : 0; + if (vA < vB) + return true; + if (vA > vB) + return false; + } + return false; +} +export function substractArrayIntToNew(arrayIntA, arrayIntB) { + if (arrayIntA.sign !== arrayIntB.sign) { + return addArrayIntToNew(arrayIntA, { sign: -arrayIntB.sign, data: arrayIntB.data }); + } + var dataA = arrayIntA.data; + var dataB = arrayIntB.data; + if (isStrictlySmaller(dataA, dataB)) { + var out = substractArrayIntToNew(arrayIntB, arrayIntA); + out.sign = -out.sign; + return out; + } + var data = []; + var reminder = 0; + for (var indexA = dataA.length - 1, indexB = dataB.length - 1; indexA >= 0 || indexB >= 0; --indexA, --indexB) { + var vA = indexA >= 0 ? dataA[indexA] : 0; + var vB = indexB >= 0 ? dataB[indexB] : 0; + var current = vA - vB - reminder; + data.push(current >>> 0); + reminder = current < 0 ? 1 : 0; + } + return { sign: arrayIntA.sign, data: data.reverse() }; +} +export function trimArrayIntInplace(arrayInt) { + var data = arrayInt.data; + var firstNonZero = 0; + for (; firstNonZero !== data.length && data[firstNonZero] === 0; ++firstNonZero) { } + if (firstNonZero === data.length) { + arrayInt.sign = 1; + arrayInt.data = [0]; + return arrayInt; + } + data.splice(0, firstNonZero); + return arrayInt; +} +export function fromNumberToArrayInt64(out, n) { + if (n < 0) { + var posN = -n; + out.sign = -1; + out.data[0] = ~~(posN / 0x100000000); + out.data[1] = posN >>> 0; + } + else { + out.sign = 1; + out.data[0] = ~~(n / 0x100000000); + out.data[1] = n >>> 0; + } + return out; +} +export function substractArrayInt64(out, arrayIntA, arrayIntB) { + var lowA = arrayIntA.data[1]; + var highA = arrayIntA.data[0]; + var signA = arrayIntA.sign; + var lowB = arrayIntB.data[1]; + var highB = arrayIntB.data[0]; + var signB = arrayIntB.sign; + out.sign = 1; + if (signA === 1 && signB === -1) { + var low_1 = lowA + lowB; + var high = highA + highB + (low_1 > 0xffffffff ? 1 : 0); + out.data[0] = high >>> 0; + out.data[1] = low_1 >>> 0; + return out; + } + var lowFirst = lowA; + var highFirst = highA; + var lowSecond = lowB; + var highSecond = highB; + if (signA === -1) { + lowFirst = lowB; + highFirst = highB; + lowSecond = lowA; + highSecond = highA; + } + var reminderLow = 0; + var low = lowFirst - lowSecond; + if (low < 0) { + reminderLow = 1; + low = low >>> 0; + } + out.data[0] = highFirst - highSecond - reminderLow; + out.data[1] = low; + return out; +} diff --git a/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js b/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js new file mode 100644 index 000000000..7f49e8e66 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js @@ -0,0 +1,21 @@ +import { unsafeUniformIntDistributionInternal } from './UnsafeUniformIntDistributionInternal.js'; +export function unsafeUniformArrayIntDistributionInternal(out, rangeSize, rng) { + var rangeLength = rangeSize.length; + while (true) { + for (var index = 0; index !== rangeLength; ++index) { + var indexRangeSize = index === 0 ? rangeSize[0] + 1 : 0x100000000; + var g = unsafeUniformIntDistributionInternal(indexRangeSize, rng); + out[index] = g; + } + for (var index = 0; index !== rangeLength; ++index) { + var current = out[index]; + var currentInRange = rangeSize[index]; + if (current < currentInRange) { + return out; + } + else if (current > currentInRange) { + break; + } + } + } +} diff --git a/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js b/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js new file mode 100644 index 000000000..235ceb396 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js @@ -0,0 +1,8 @@ +export function unsafeUniformIntDistributionInternal(rangeSize, rng) { + var MaxAllowed = rangeSize > 2 ? ~~(0x100000000 / rangeSize) * rangeSize : 0x100000000; + var deltaV = rng.unsafeNext() + 0x80000000; + while (deltaV >= MaxAllowed) { + deltaV = rng.unsafeNext() + 0x80000000; + } + return deltaV % rangeSize; +} diff --git a/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js b/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js new file mode 100644 index 000000000..70037008a --- /dev/null +++ b/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js @@ -0,0 +1,37 @@ +var MULTIPLIER = 0x000343fd; +var INCREMENT = 0x00269ec3; +var MASK = 0xffffffff; +var MASK_2 = (1 << 31) - 1; +var computeNextSeed = function (seed) { + return (seed * MULTIPLIER + INCREMENT) & MASK; +}; +var computeValueFromNextSeed = function (nextseed) { + return (nextseed & MASK_2) >> 16; +}; +var LinearCongruential32 = (function () { + function LinearCongruential32(seed) { + this.seed = seed; + } + LinearCongruential32.prototype.clone = function () { + return new LinearCongruential32(this.seed); + }; + LinearCongruential32.prototype.next = function () { + var nextRng = new LinearCongruential32(this.seed); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + LinearCongruential32.prototype.unsafeNext = function () { + var s1 = computeNextSeed(this.seed); + var v1 = computeValueFromNextSeed(s1); + var s2 = computeNextSeed(s1); + var v2 = computeValueFromNextSeed(s2); + this.seed = computeNextSeed(s2); + var v3 = computeValueFromNextSeed(this.seed); + var vnext = v3 + ((v2 + (v1 << 15)) << 15); + return vnext | 0; + }; + return LinearCongruential32; +}()); +export var congruential32 = function (seed) { + return new LinearCongruential32(seed); +}; diff --git a/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js b/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js new file mode 100644 index 000000000..f1dad6f08 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js @@ -0,0 +1,69 @@ +var MersenneTwister = (function () { + function MersenneTwister(states, index) { + this.states = states; + this.index = index; + } + MersenneTwister.twist = function (prev) { + var mt = prev.slice(); + for (var idx = 0; idx !== MersenneTwister.N - MersenneTwister.M; ++idx) { + var y_1 = (mt[idx] & MersenneTwister.MASK_UPPER) + (mt[idx + 1] & MersenneTwister.MASK_LOWER); + mt[idx] = mt[idx + MersenneTwister.M] ^ (y_1 >>> 1) ^ (-(y_1 & 1) & MersenneTwister.A); + } + for (var idx = MersenneTwister.N - MersenneTwister.M; idx !== MersenneTwister.N - 1; ++idx) { + var y_2 = (mt[idx] & MersenneTwister.MASK_UPPER) + (mt[idx + 1] & MersenneTwister.MASK_LOWER); + mt[idx] = mt[idx + MersenneTwister.M - MersenneTwister.N] ^ (y_2 >>> 1) ^ (-(y_2 & 1) & MersenneTwister.A); + } + var y = (mt[MersenneTwister.N - 1] & MersenneTwister.MASK_UPPER) + (mt[0] & MersenneTwister.MASK_LOWER); + mt[MersenneTwister.N - 1] = mt[MersenneTwister.M - 1] ^ (y >>> 1) ^ (-(y & 1) & MersenneTwister.A); + return mt; + }; + MersenneTwister.seeded = function (seed) { + var out = Array(MersenneTwister.N); + out[0] = seed; + for (var idx = 1; idx !== MersenneTwister.N; ++idx) { + var xored = out[idx - 1] ^ (out[idx - 1] >>> 30); + out[idx] = (Math.imul(MersenneTwister.F, xored) + idx) | 0; + } + return out; + }; + MersenneTwister.from = function (seed) { + return new MersenneTwister(MersenneTwister.twist(MersenneTwister.seeded(seed)), 0); + }; + MersenneTwister.prototype.clone = function () { + return new MersenneTwister(this.states, this.index); + }; + MersenneTwister.prototype.next = function () { + var nextRng = new MersenneTwister(this.states, this.index); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + MersenneTwister.prototype.unsafeNext = function () { + var y = this.states[this.index]; + y ^= this.states[this.index] >>> MersenneTwister.U; + y ^= (y << MersenneTwister.S) & MersenneTwister.B; + y ^= (y << MersenneTwister.T) & MersenneTwister.C; + y ^= y >>> MersenneTwister.L; + if (++this.index >= MersenneTwister.N) { + this.states = MersenneTwister.twist(this.states); + this.index = 0; + } + return y; + }; + MersenneTwister.N = 624; + MersenneTwister.M = 397; + MersenneTwister.R = 31; + MersenneTwister.A = 0x9908b0df; + MersenneTwister.F = 1812433253; + MersenneTwister.U = 11; + MersenneTwister.S = 7; + MersenneTwister.B = 0x9d2c5680; + MersenneTwister.T = 15; + MersenneTwister.C = 0xefc60000; + MersenneTwister.L = 18; + MersenneTwister.MASK_LOWER = Math.pow(2, MersenneTwister.R) - 1; + MersenneTwister.MASK_UPPER = Math.pow(2, MersenneTwister.R); + return MersenneTwister; +}()); +export default function (seed) { + return MersenneTwister.from(seed); +} diff --git a/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js b/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js new file mode 100644 index 000000000..49975ac6a --- /dev/null +++ b/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js @@ -0,0 +1,22 @@ +export function unsafeGenerateN(rng, num) { + var out = []; + for (var idx = 0; idx != num; ++idx) { + out.push(rng.unsafeNext()); + } + return out; +} +export function generateN(rng, num) { + var nextRng = rng.clone(); + var out = unsafeGenerateN(nextRng, num); + return [out, nextRng]; +} +export function unsafeSkipN(rng, num) { + for (var idx = 0; idx != num; ++idx) { + rng.unsafeNext(); + } +} +export function skipN(rng, num) { + var nextRng = rng.clone(); + unsafeSkipN(nextRng, num); + return nextRng; +} diff --git a/node_modules/pure-rand/lib/esm/generator/XorShift.js b/node_modules/pure-rand/lib/esm/generator/XorShift.js new file mode 100644 index 000000000..8b197017c --- /dev/null +++ b/node_modules/pure-rand/lib/esm/generator/XorShift.js @@ -0,0 +1,59 @@ +var XorShift128Plus = (function () { + function XorShift128Plus(s01, s00, s11, s10) { + this.s01 = s01; + this.s00 = s00; + this.s11 = s11; + this.s10 = s10; + } + XorShift128Plus.prototype.clone = function () { + return new XorShift128Plus(this.s01, this.s00, this.s11, this.s10); + }; + XorShift128Plus.prototype.next = function () { + var nextRng = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + XorShift128Plus.prototype.unsafeNext = function () { + var a0 = this.s00 ^ (this.s00 << 23); + var a1 = this.s01 ^ ((this.s01 << 23) | (this.s00 >>> 9)); + var b0 = a0 ^ this.s10 ^ ((a0 >>> 18) | (a1 << 14)) ^ ((this.s10 >>> 5) | (this.s11 << 27)); + var b1 = a1 ^ this.s11 ^ (a1 >>> 18) ^ (this.s11 >>> 5); + var out = (this.s00 + this.s10) | 0; + this.s01 = this.s11; + this.s00 = this.s10; + this.s11 = b1; + this.s10 = b0; + return out; + }; + XorShift128Plus.prototype.jump = function () { + var nextRng = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10); + nextRng.unsafeJump(); + return nextRng; + }; + XorShift128Plus.prototype.unsafeJump = function () { + var ns01 = 0; + var ns00 = 0; + var ns11 = 0; + var ns10 = 0; + var jump = [0x635d2dff, 0x8a5cd789, 0x5c472f96, 0x121fd215]; + for (var i = 0; i !== 4; ++i) { + for (var mask = 1; mask; mask <<= 1) { + if (jump[i] & mask) { + ns01 ^= this.s01; + ns00 ^= this.s00; + ns11 ^= this.s11; + ns10 ^= this.s10; + } + this.unsafeNext(); + } + } + this.s01 = ns01; + this.s00 = ns00; + this.s11 = ns11; + this.s10 = ns10; + }; + return XorShift128Plus; +}()); +export var xorshift128plus = function (seed) { + return new XorShift128Plus(-1, ~seed, seed | 0, 0); +}; diff --git a/node_modules/pure-rand/lib/esm/generator/XoroShiro.js b/node_modules/pure-rand/lib/esm/generator/XoroShiro.js new file mode 100644 index 000000000..8a249cfe3 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/generator/XoroShiro.js @@ -0,0 +1,59 @@ +var XoroShiro128Plus = (function () { + function XoroShiro128Plus(s01, s00, s11, s10) { + this.s01 = s01; + this.s00 = s00; + this.s11 = s11; + this.s10 = s10; + } + XoroShiro128Plus.prototype.clone = function () { + return new XoroShiro128Plus(this.s01, this.s00, this.s11, this.s10); + }; + XoroShiro128Plus.prototype.next = function () { + var nextRng = new XoroShiro128Plus(this.s01, this.s00, this.s11, this.s10); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + XoroShiro128Plus.prototype.unsafeNext = function () { + var out = (this.s00 + this.s10) | 0; + var a0 = this.s10 ^ this.s00; + var a1 = this.s11 ^ this.s01; + var s00 = this.s00; + var s01 = this.s01; + this.s00 = (s00 << 24) ^ (s01 >>> 8) ^ a0 ^ (a0 << 16); + this.s01 = (s01 << 24) ^ (s00 >>> 8) ^ a1 ^ ((a1 << 16) | (a0 >>> 16)); + this.s10 = (a1 << 5) ^ (a0 >>> 27); + this.s11 = (a0 << 5) ^ (a1 >>> 27); + return out; + }; + XoroShiro128Plus.prototype.jump = function () { + var nextRng = new XoroShiro128Plus(this.s01, this.s00, this.s11, this.s10); + nextRng.unsafeJump(); + return nextRng; + }; + XoroShiro128Plus.prototype.unsafeJump = function () { + var ns01 = 0; + var ns00 = 0; + var ns11 = 0; + var ns10 = 0; + var jump = [0xd8f554a5, 0xdf900294, 0x4b3201fc, 0x170865df]; + for (var i = 0; i !== 4; ++i) { + for (var mask = 1; mask; mask <<= 1) { + if (jump[i] & mask) { + ns01 ^= this.s01; + ns00 ^= this.s00; + ns11 ^= this.s11; + ns10 ^= this.s10; + } + this.unsafeNext(); + } + } + this.s01 = ns01; + this.s00 = ns00; + this.s11 = ns11; + this.s10 = ns10; + }; + return XoroShiro128Plus; +}()); +export var xoroshiro128plus = function (seed) { + return new XoroShiro128Plus(-1, ~seed, seed | 0, 0); +}; diff --git a/node_modules/pure-rand/lib/esm/package.json b/node_modules/pure-rand/lib/esm/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/pure-rand/lib/esm/pure-rand-default.js b/node_modules/pure-rand/lib/esm/pure-rand-default.js new file mode 100644 index 000000000..e1a34b6c8 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/pure-rand-default.js @@ -0,0 +1,15 @@ +import { generateN, skipN, unsafeGenerateN, unsafeSkipN } from './generator/RandomGenerator.js'; +import { congruential32 } from './generator/LinearCongruential.js'; +import mersenne from './generator/MersenneTwister.js'; +import { xorshift128plus } from './generator/XorShift.js'; +import { xoroshiro128plus } from './generator/XoroShiro.js'; +import { uniformArrayIntDistribution } from './distribution/UniformArrayIntDistribution.js'; +import { uniformBigIntDistribution } from './distribution/UniformBigIntDistribution.js'; +import { uniformIntDistribution } from './distribution/UniformIntDistribution.js'; +import { unsafeUniformArrayIntDistribution } from './distribution/UnsafeUniformArrayIntDistribution.js'; +import { unsafeUniformBigIntDistribution } from './distribution/UnsafeUniformBigIntDistribution.js'; +import { unsafeUniformIntDistribution } from './distribution/UnsafeUniformIntDistribution.js'; +var __type = 'module'; +var __version = '6.0.1'; +var __commitHash = '349e8d3113633ba2bbbb5a6ec129b7f665dd3112'; +export { __type, __version, __commitHash, generateN, skipN, unsafeGenerateN, unsafeSkipN, congruential32, mersenne, xorshift128plus, xoroshiro128plus, uniformArrayIntDistribution, uniformBigIntDistribution, uniformIntDistribution, unsafeUniformArrayIntDistribution, unsafeUniformBigIntDistribution, unsafeUniformIntDistribution, }; diff --git a/node_modules/pure-rand/lib/esm/pure-rand.js b/node_modules/pure-rand/lib/esm/pure-rand.js new file mode 100644 index 000000000..4e3bfe296 --- /dev/null +++ b/node_modules/pure-rand/lib/esm/pure-rand.js @@ -0,0 +1,3 @@ +import * as prand from './pure-rand-default.js'; +export default prand; +export * from './pure-rand-default.js'; diff --git a/node_modules/pure-rand/lib/generator/LinearCongruential.js b/node_modules/pure-rand/lib/generator/LinearCongruential.js new file mode 100644 index 000000000..421dae98c --- /dev/null +++ b/node_modules/pure-rand/lib/generator/LinearCongruential.js @@ -0,0 +1,41 @@ +"use strict"; +exports.__esModule = true; +exports.congruential32 = void 0; +var MULTIPLIER = 0x000343fd; +var INCREMENT = 0x00269ec3; +var MASK = 0xffffffff; +var MASK_2 = (1 << 31) - 1; +var computeNextSeed = function (seed) { + return (seed * MULTIPLIER + INCREMENT) & MASK; +}; +var computeValueFromNextSeed = function (nextseed) { + return (nextseed & MASK_2) >> 16; +}; +var LinearCongruential32 = (function () { + function LinearCongruential32(seed) { + this.seed = seed; + } + LinearCongruential32.prototype.clone = function () { + return new LinearCongruential32(this.seed); + }; + LinearCongruential32.prototype.next = function () { + var nextRng = new LinearCongruential32(this.seed); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + LinearCongruential32.prototype.unsafeNext = function () { + var s1 = computeNextSeed(this.seed); + var v1 = computeValueFromNextSeed(s1); + var s2 = computeNextSeed(s1); + var v2 = computeValueFromNextSeed(s2); + this.seed = computeNextSeed(s2); + var v3 = computeValueFromNextSeed(this.seed); + var vnext = v3 + ((v2 + (v1 << 15)) << 15); + return vnext | 0; + }; + return LinearCongruential32; +}()); +var congruential32 = function (seed) { + return new LinearCongruential32(seed); +}; +exports.congruential32 = congruential32; diff --git a/node_modules/pure-rand/lib/generator/MersenneTwister.js b/node_modules/pure-rand/lib/generator/MersenneTwister.js new file mode 100644 index 000000000..4dbe8cb36 --- /dev/null +++ b/node_modules/pure-rand/lib/generator/MersenneTwister.js @@ -0,0 +1,72 @@ +"use strict"; +exports.__esModule = true; +var MersenneTwister = (function () { + function MersenneTwister(states, index) { + this.states = states; + this.index = index; + } + MersenneTwister.twist = function (prev) { + var mt = prev.slice(); + for (var idx = 0; idx !== MersenneTwister.N - MersenneTwister.M; ++idx) { + var y_1 = (mt[idx] & MersenneTwister.MASK_UPPER) + (mt[idx + 1] & MersenneTwister.MASK_LOWER); + mt[idx] = mt[idx + MersenneTwister.M] ^ (y_1 >>> 1) ^ (-(y_1 & 1) & MersenneTwister.A); + } + for (var idx = MersenneTwister.N - MersenneTwister.M; idx !== MersenneTwister.N - 1; ++idx) { + var y_2 = (mt[idx] & MersenneTwister.MASK_UPPER) + (mt[idx + 1] & MersenneTwister.MASK_LOWER); + mt[idx] = mt[idx + MersenneTwister.M - MersenneTwister.N] ^ (y_2 >>> 1) ^ (-(y_2 & 1) & MersenneTwister.A); + } + var y = (mt[MersenneTwister.N - 1] & MersenneTwister.MASK_UPPER) + (mt[0] & MersenneTwister.MASK_LOWER); + mt[MersenneTwister.N - 1] = mt[MersenneTwister.M - 1] ^ (y >>> 1) ^ (-(y & 1) & MersenneTwister.A); + return mt; + }; + MersenneTwister.seeded = function (seed) { + var out = Array(MersenneTwister.N); + out[0] = seed; + for (var idx = 1; idx !== MersenneTwister.N; ++idx) { + var xored = out[idx - 1] ^ (out[idx - 1] >>> 30); + out[idx] = (Math.imul(MersenneTwister.F, xored) + idx) | 0; + } + return out; + }; + MersenneTwister.from = function (seed) { + return new MersenneTwister(MersenneTwister.twist(MersenneTwister.seeded(seed)), 0); + }; + MersenneTwister.prototype.clone = function () { + return new MersenneTwister(this.states, this.index); + }; + MersenneTwister.prototype.next = function () { + var nextRng = new MersenneTwister(this.states, this.index); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + MersenneTwister.prototype.unsafeNext = function () { + var y = this.states[this.index]; + y ^= this.states[this.index] >>> MersenneTwister.U; + y ^= (y << MersenneTwister.S) & MersenneTwister.B; + y ^= (y << MersenneTwister.T) & MersenneTwister.C; + y ^= y >>> MersenneTwister.L; + if (++this.index >= MersenneTwister.N) { + this.states = MersenneTwister.twist(this.states); + this.index = 0; + } + return y; + }; + MersenneTwister.N = 624; + MersenneTwister.M = 397; + MersenneTwister.R = 31; + MersenneTwister.A = 0x9908b0df; + MersenneTwister.F = 1812433253; + MersenneTwister.U = 11; + MersenneTwister.S = 7; + MersenneTwister.B = 0x9d2c5680; + MersenneTwister.T = 15; + MersenneTwister.C = 0xefc60000; + MersenneTwister.L = 18; + MersenneTwister.MASK_LOWER = Math.pow(2, MersenneTwister.R) - 1; + MersenneTwister.MASK_UPPER = Math.pow(2, MersenneTwister.R); + return MersenneTwister; +}()); +function default_1(seed) { + return MersenneTwister.from(seed); +} +exports["default"] = default_1; diff --git a/node_modules/pure-rand/lib/generator/RandomGenerator.js b/node_modules/pure-rand/lib/generator/RandomGenerator.js new file mode 100644 index 000000000..6a8c725f7 --- /dev/null +++ b/node_modules/pure-rand/lib/generator/RandomGenerator.js @@ -0,0 +1,29 @@ +"use strict"; +exports.__esModule = true; +exports.skipN = exports.unsafeSkipN = exports.generateN = exports.unsafeGenerateN = void 0; +function unsafeGenerateN(rng, num) { + var out = []; + for (var idx = 0; idx != num; ++idx) { + out.push(rng.unsafeNext()); + } + return out; +} +exports.unsafeGenerateN = unsafeGenerateN; +function generateN(rng, num) { + var nextRng = rng.clone(); + var out = unsafeGenerateN(nextRng, num); + return [out, nextRng]; +} +exports.generateN = generateN; +function unsafeSkipN(rng, num) { + for (var idx = 0; idx != num; ++idx) { + rng.unsafeNext(); + } +} +exports.unsafeSkipN = unsafeSkipN; +function skipN(rng, num) { + var nextRng = rng.clone(); + unsafeSkipN(nextRng, num); + return nextRng; +} +exports.skipN = skipN; diff --git a/node_modules/pure-rand/lib/generator/XorShift.js b/node_modules/pure-rand/lib/generator/XorShift.js new file mode 100644 index 000000000..ec7b77e2b --- /dev/null +++ b/node_modules/pure-rand/lib/generator/XorShift.js @@ -0,0 +1,63 @@ +"use strict"; +exports.__esModule = true; +exports.xorshift128plus = void 0; +var XorShift128Plus = (function () { + function XorShift128Plus(s01, s00, s11, s10) { + this.s01 = s01; + this.s00 = s00; + this.s11 = s11; + this.s10 = s10; + } + XorShift128Plus.prototype.clone = function () { + return new XorShift128Plus(this.s01, this.s00, this.s11, this.s10); + }; + XorShift128Plus.prototype.next = function () { + var nextRng = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + XorShift128Plus.prototype.unsafeNext = function () { + var a0 = this.s00 ^ (this.s00 << 23); + var a1 = this.s01 ^ ((this.s01 << 23) | (this.s00 >>> 9)); + var b0 = a0 ^ this.s10 ^ ((a0 >>> 18) | (a1 << 14)) ^ ((this.s10 >>> 5) | (this.s11 << 27)); + var b1 = a1 ^ this.s11 ^ (a1 >>> 18) ^ (this.s11 >>> 5); + var out = (this.s00 + this.s10) | 0; + this.s01 = this.s11; + this.s00 = this.s10; + this.s11 = b1; + this.s10 = b0; + return out; + }; + XorShift128Plus.prototype.jump = function () { + var nextRng = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10); + nextRng.unsafeJump(); + return nextRng; + }; + XorShift128Plus.prototype.unsafeJump = function () { + var ns01 = 0; + var ns00 = 0; + var ns11 = 0; + var ns10 = 0; + var jump = [0x635d2dff, 0x8a5cd789, 0x5c472f96, 0x121fd215]; + for (var i = 0; i !== 4; ++i) { + for (var mask = 1; mask; mask <<= 1) { + if (jump[i] & mask) { + ns01 ^= this.s01; + ns00 ^= this.s00; + ns11 ^= this.s11; + ns10 ^= this.s10; + } + this.unsafeNext(); + } + } + this.s01 = ns01; + this.s00 = ns00; + this.s11 = ns11; + this.s10 = ns10; + }; + return XorShift128Plus; +}()); +var xorshift128plus = function (seed) { + return new XorShift128Plus(-1, ~seed, seed | 0, 0); +}; +exports.xorshift128plus = xorshift128plus; diff --git a/node_modules/pure-rand/lib/generator/XoroShiro.js b/node_modules/pure-rand/lib/generator/XoroShiro.js new file mode 100644 index 000000000..27900b6cb --- /dev/null +++ b/node_modules/pure-rand/lib/generator/XoroShiro.js @@ -0,0 +1,63 @@ +"use strict"; +exports.__esModule = true; +exports.xoroshiro128plus = void 0; +var XoroShiro128Plus = (function () { + function XoroShiro128Plus(s01, s00, s11, s10) { + this.s01 = s01; + this.s00 = s00; + this.s11 = s11; + this.s10 = s10; + } + XoroShiro128Plus.prototype.clone = function () { + return new XoroShiro128Plus(this.s01, this.s00, this.s11, this.s10); + }; + XoroShiro128Plus.prototype.next = function () { + var nextRng = new XoroShiro128Plus(this.s01, this.s00, this.s11, this.s10); + var out = nextRng.unsafeNext(); + return [out, nextRng]; + }; + XoroShiro128Plus.prototype.unsafeNext = function () { + var out = (this.s00 + this.s10) | 0; + var a0 = this.s10 ^ this.s00; + var a1 = this.s11 ^ this.s01; + var s00 = this.s00; + var s01 = this.s01; + this.s00 = (s00 << 24) ^ (s01 >>> 8) ^ a0 ^ (a0 << 16); + this.s01 = (s01 << 24) ^ (s00 >>> 8) ^ a1 ^ ((a1 << 16) | (a0 >>> 16)); + this.s10 = (a1 << 5) ^ (a0 >>> 27); + this.s11 = (a0 << 5) ^ (a1 >>> 27); + return out; + }; + XoroShiro128Plus.prototype.jump = function () { + var nextRng = new XoroShiro128Plus(this.s01, this.s00, this.s11, this.s10); + nextRng.unsafeJump(); + return nextRng; + }; + XoroShiro128Plus.prototype.unsafeJump = function () { + var ns01 = 0; + var ns00 = 0; + var ns11 = 0; + var ns10 = 0; + var jump = [0xd8f554a5, 0xdf900294, 0x4b3201fc, 0x170865df]; + for (var i = 0; i !== 4; ++i) { + for (var mask = 1; mask; mask <<= 1) { + if (jump[i] & mask) { + ns01 ^= this.s01; + ns00 ^= this.s00; + ns11 ^= this.s11; + ns10 ^= this.s10; + } + this.unsafeNext(); + } + } + this.s01 = ns01; + this.s00 = ns00; + this.s11 = ns11; + this.s10 = ns10; + }; + return XoroShiro128Plus; +}()); +var xoroshiro128plus = function (seed) { + return new XoroShiro128Plus(-1, ~seed, seed | 0, 0); +}; +exports.xoroshiro128plus = xoroshiro128plus; diff --git a/node_modules/pure-rand/lib/pure-rand-default.js b/node_modules/pure-rand/lib/pure-rand-default.js new file mode 100644 index 000000000..00cd3cf03 --- /dev/null +++ b/node_modules/pure-rand/lib/pure-rand-default.js @@ -0,0 +1,34 @@ +"use strict"; +exports.__esModule = true; +exports.unsafeUniformIntDistribution = exports.unsafeUniformBigIntDistribution = exports.unsafeUniformArrayIntDistribution = exports.uniformIntDistribution = exports.uniformBigIntDistribution = exports.uniformArrayIntDistribution = exports.xoroshiro128plus = exports.xorshift128plus = exports.mersenne = exports.congruential32 = exports.unsafeSkipN = exports.unsafeGenerateN = exports.skipN = exports.generateN = exports.__commitHash = exports.__version = exports.__type = void 0; +var RandomGenerator_1 = require("./generator/RandomGenerator"); +exports.generateN = RandomGenerator_1.generateN; +exports.skipN = RandomGenerator_1.skipN; +exports.unsafeGenerateN = RandomGenerator_1.unsafeGenerateN; +exports.unsafeSkipN = RandomGenerator_1.unsafeSkipN; +var LinearCongruential_1 = require("./generator/LinearCongruential"); +exports.congruential32 = LinearCongruential_1.congruential32; +var MersenneTwister_1 = require("./generator/MersenneTwister"); +exports.mersenne = MersenneTwister_1["default"]; +var XorShift_1 = require("./generator/XorShift"); +exports.xorshift128plus = XorShift_1.xorshift128plus; +var XoroShiro_1 = require("./generator/XoroShiro"); +exports.xoroshiro128plus = XoroShiro_1.xoroshiro128plus; +var UniformArrayIntDistribution_1 = require("./distribution/UniformArrayIntDistribution"); +exports.uniformArrayIntDistribution = UniformArrayIntDistribution_1.uniformArrayIntDistribution; +var UniformBigIntDistribution_1 = require("./distribution/UniformBigIntDistribution"); +exports.uniformBigIntDistribution = UniformBigIntDistribution_1.uniformBigIntDistribution; +var UniformIntDistribution_1 = require("./distribution/UniformIntDistribution"); +exports.uniformIntDistribution = UniformIntDistribution_1.uniformIntDistribution; +var UnsafeUniformArrayIntDistribution_1 = require("./distribution/UnsafeUniformArrayIntDistribution"); +exports.unsafeUniformArrayIntDistribution = UnsafeUniformArrayIntDistribution_1.unsafeUniformArrayIntDistribution; +var UnsafeUniformBigIntDistribution_1 = require("./distribution/UnsafeUniformBigIntDistribution"); +exports.unsafeUniformBigIntDistribution = UnsafeUniformBigIntDistribution_1.unsafeUniformBigIntDistribution; +var UnsafeUniformIntDistribution_1 = require("./distribution/UnsafeUniformIntDistribution"); +exports.unsafeUniformIntDistribution = UnsafeUniformIntDistribution_1.unsafeUniformIntDistribution; +var __type = 'commonjs'; +exports.__type = __type; +var __version = '6.0.1'; +exports.__version = __version; +var __commitHash = '349e8d3113633ba2bbbb5a6ec129b7f665dd3112'; +exports.__commitHash = __commitHash; diff --git a/node_modules/pure-rand/lib/pure-rand.js b/node_modules/pure-rand/lib/pure-rand.js new file mode 100644 index 000000000..e8640b375 --- /dev/null +++ b/node_modules/pure-rand/lib/pure-rand.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +exports.__esModule = true; +var prand = require("./pure-rand-default"); +exports["default"] = prand; +__exportStar(require("./pure-rand-default"), exports); diff --git a/node_modules/pure-rand/lib/types/distribution/Distribution.d.ts b/node_modules/pure-rand/lib/types/distribution/Distribution.d.ts new file mode 100644 index 000000000..db5d6e967 --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/Distribution.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from '../generator/RandomGenerator'; +export type Distribution = (rng: RandomGenerator) => [T, RandomGenerator]; diff --git a/node_modules/pure-rand/lib/types/distribution/UniformArrayIntDistribution.d.ts b/node_modules/pure-rand/lib/types/distribution/UniformArrayIntDistribution.d.ts new file mode 100644 index 000000000..8e42fed2a --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/UniformArrayIntDistribution.d.ts @@ -0,0 +1,6 @@ +import { Distribution } from './Distribution'; +import { RandomGenerator } from '../generator/RandomGenerator'; +import { ArrayInt } from './internals/ArrayInt'; +declare function uniformArrayIntDistribution(from: ArrayInt, to: ArrayInt): Distribution; +declare function uniformArrayIntDistribution(from: ArrayInt, to: ArrayInt, rng: RandomGenerator): [ArrayInt, RandomGenerator]; +export { uniformArrayIntDistribution }; diff --git a/node_modules/pure-rand/lib/types/distribution/UniformBigIntDistribution.d.ts b/node_modules/pure-rand/lib/types/distribution/UniformBigIntDistribution.d.ts new file mode 100644 index 000000000..80ee29883 --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/UniformBigIntDistribution.d.ts @@ -0,0 +1,5 @@ +import { Distribution } from './Distribution'; +import { RandomGenerator } from '../generator/RandomGenerator'; +declare function uniformBigIntDistribution(from: bigint, to: bigint): Distribution; +declare function uniformBigIntDistribution(from: bigint, to: bigint, rng: RandomGenerator): [bigint, RandomGenerator]; +export { uniformBigIntDistribution }; diff --git a/node_modules/pure-rand/lib/types/distribution/UniformIntDistribution.d.ts b/node_modules/pure-rand/lib/types/distribution/UniformIntDistribution.d.ts new file mode 100644 index 000000000..acd194d94 --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/UniformIntDistribution.d.ts @@ -0,0 +1,5 @@ +import { Distribution } from './Distribution'; +import { RandomGenerator } from '../generator/RandomGenerator'; +declare function uniformIntDistribution(from: number, to: number): Distribution; +declare function uniformIntDistribution(from: number, to: number, rng: RandomGenerator): [number, RandomGenerator]; +export { uniformIntDistribution }; diff --git a/node_modules/pure-rand/lib/types/distribution/UnsafeUniformArrayIntDistribution.d.ts b/node_modules/pure-rand/lib/types/distribution/UnsafeUniformArrayIntDistribution.d.ts new file mode 100644 index 000000000..4c9719a3b --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/UnsafeUniformArrayIntDistribution.d.ts @@ -0,0 +1,3 @@ +import { RandomGenerator } from '../generator/RandomGenerator'; +import { ArrayInt } from './internals/ArrayInt'; +export declare function unsafeUniformArrayIntDistribution(from: ArrayInt, to: ArrayInt, rng: RandomGenerator): ArrayInt; diff --git a/node_modules/pure-rand/lib/types/distribution/UnsafeUniformBigIntDistribution.d.ts b/node_modules/pure-rand/lib/types/distribution/UnsafeUniformBigIntDistribution.d.ts new file mode 100644 index 000000000..0762a72f0 --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/UnsafeUniformBigIntDistribution.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from '../generator/RandomGenerator'; +export declare function unsafeUniformBigIntDistribution(from: bigint, to: bigint, rng: RandomGenerator): bigint; diff --git a/node_modules/pure-rand/lib/types/distribution/UnsafeUniformIntDistribution.d.ts b/node_modules/pure-rand/lib/types/distribution/UnsafeUniformIntDistribution.d.ts new file mode 100644 index 000000000..c44aaa8cb --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/UnsafeUniformIntDistribution.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from '../generator/RandomGenerator'; +export declare function unsafeUniformIntDistribution(from: number, to: number, rng: RandomGenerator): number; diff --git a/node_modules/pure-rand/lib/types/distribution/internals/ArrayInt.d.ts b/node_modules/pure-rand/lib/types/distribution/internals/ArrayInt.d.ts new file mode 100644 index 000000000..eebc3a15a --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/internals/ArrayInt.d.ts @@ -0,0 +1,13 @@ +export type ArrayInt = { + sign: -1 | 1; + data: number[]; +}; +export declare function addArrayIntToNew(arrayIntA: ArrayInt, arrayIntB: ArrayInt): ArrayInt; +export declare function addOneToPositiveArrayInt(arrayInt: ArrayInt): ArrayInt; +export declare function substractArrayIntToNew(arrayIntA: ArrayInt, arrayIntB: ArrayInt): ArrayInt; +export declare function trimArrayIntInplace(arrayInt: ArrayInt): ArrayInt; +export type ArrayInt64 = Required & { + data: [number, number]; +}; +export declare function fromNumberToArrayInt64(out: ArrayInt64, n: number): ArrayInt64; +export declare function substractArrayInt64(out: ArrayInt64, arrayIntA: ArrayInt64, arrayIntB: ArrayInt64): ArrayInt64; diff --git a/node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformArrayIntDistributionInternal.d.ts b/node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformArrayIntDistributionInternal.d.ts new file mode 100644 index 000000000..b359088d9 --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformArrayIntDistributionInternal.d.ts @@ -0,0 +1,3 @@ +import { RandomGenerator } from '../../generator/RandomGenerator'; +import { ArrayInt } from './ArrayInt'; +export declare function unsafeUniformArrayIntDistributionInternal(out: ArrayInt['data'], rangeSize: ArrayInt['data'], rng: RandomGenerator): ArrayInt['data']; diff --git a/node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformIntDistributionInternal.d.ts b/node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformIntDistributionInternal.d.ts new file mode 100644 index 000000000..856e832da --- /dev/null +++ b/node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformIntDistributionInternal.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from '../../generator/RandomGenerator'; +export declare function unsafeUniformIntDistributionInternal(rangeSize: number, rng: RandomGenerator): number; diff --git a/node_modules/pure-rand/lib/types/generator/LinearCongruential.d.ts b/node_modules/pure-rand/lib/types/generator/LinearCongruential.d.ts new file mode 100644 index 000000000..e78679ec4 --- /dev/null +++ b/node_modules/pure-rand/lib/types/generator/LinearCongruential.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from './RandomGenerator'; +export declare const congruential32: (seed: number) => RandomGenerator; diff --git a/node_modules/pure-rand/lib/types/generator/MersenneTwister.d.ts b/node_modules/pure-rand/lib/types/generator/MersenneTwister.d.ts new file mode 100644 index 000000000..e0809b7a2 --- /dev/null +++ b/node_modules/pure-rand/lib/types/generator/MersenneTwister.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from './RandomGenerator'; +export default function (seed: number): RandomGenerator; diff --git a/node_modules/pure-rand/lib/types/generator/RandomGenerator.d.ts b/node_modules/pure-rand/lib/types/generator/RandomGenerator.d.ts new file mode 100644 index 000000000..b9311ea2a --- /dev/null +++ b/node_modules/pure-rand/lib/types/generator/RandomGenerator.d.ts @@ -0,0 +1,11 @@ +export interface RandomGenerator { + clone(): RandomGenerator; + next(): [number, RandomGenerator]; + jump?(): RandomGenerator; + unsafeNext(): number; + unsafeJump?(): void; +} +export declare function unsafeGenerateN(rng: RandomGenerator, num: number): number[]; +export declare function generateN(rng: RandomGenerator, num: number): [number[], RandomGenerator]; +export declare function unsafeSkipN(rng: RandomGenerator, num: number): void; +export declare function skipN(rng: RandomGenerator, num: number): RandomGenerator; diff --git a/node_modules/pure-rand/lib/types/generator/XorShift.d.ts b/node_modules/pure-rand/lib/types/generator/XorShift.d.ts new file mode 100644 index 000000000..766890087 --- /dev/null +++ b/node_modules/pure-rand/lib/types/generator/XorShift.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from './RandomGenerator'; +export declare const xorshift128plus: (seed: number) => RandomGenerator; diff --git a/node_modules/pure-rand/lib/types/generator/XoroShiro.d.ts b/node_modules/pure-rand/lib/types/generator/XoroShiro.d.ts new file mode 100644 index 000000000..bf77efffc --- /dev/null +++ b/node_modules/pure-rand/lib/types/generator/XoroShiro.d.ts @@ -0,0 +1,2 @@ +import { RandomGenerator } from './RandomGenerator'; +export declare const xoroshiro128plus: (seed: number) => RandomGenerator; diff --git a/node_modules/pure-rand/lib/types/pure-rand-default.d.ts b/node_modules/pure-rand/lib/types/pure-rand-default.d.ts new file mode 100644 index 000000000..3bbc32630 --- /dev/null +++ b/node_modules/pure-rand/lib/types/pure-rand-default.d.ts @@ -0,0 +1,16 @@ +import { RandomGenerator, generateN, skipN, unsafeGenerateN, unsafeSkipN } from './generator/RandomGenerator'; +import { congruential32 } from './generator/LinearCongruential'; +import mersenne from './generator/MersenneTwister'; +import { xorshift128plus } from './generator/XorShift'; +import { xoroshiro128plus } from './generator/XoroShiro'; +import { Distribution } from './distribution/Distribution'; +import { uniformArrayIntDistribution } from './distribution/UniformArrayIntDistribution'; +import { uniformBigIntDistribution } from './distribution/UniformBigIntDistribution'; +import { uniformIntDistribution } from './distribution/UniformIntDistribution'; +import { unsafeUniformArrayIntDistribution } from './distribution/UnsafeUniformArrayIntDistribution'; +import { unsafeUniformBigIntDistribution } from './distribution/UnsafeUniformBigIntDistribution'; +import { unsafeUniformIntDistribution } from './distribution/UnsafeUniformIntDistribution'; +declare const __type: string; +declare const __version: string; +declare const __commitHash: string; +export { __type, __version, __commitHash, RandomGenerator, generateN, skipN, unsafeGenerateN, unsafeSkipN, congruential32, mersenne, xorshift128plus, xoroshiro128plus, Distribution, uniformArrayIntDistribution, uniformBigIntDistribution, uniformIntDistribution, unsafeUniformArrayIntDistribution, unsafeUniformBigIntDistribution, unsafeUniformIntDistribution, }; diff --git a/node_modules/pure-rand/lib/types/pure-rand.d.ts b/node_modules/pure-rand/lib/types/pure-rand.d.ts new file mode 100644 index 000000000..25210e62c --- /dev/null +++ b/node_modules/pure-rand/lib/types/pure-rand.d.ts @@ -0,0 +1,3 @@ +import * as prand from './pure-rand-default'; +export default prand; +export * from './pure-rand-default'; diff --git a/node_modules/pure-rand/package.json b/node_modules/pure-rand/package.json new file mode 100644 index 000000000..2bfc6e7fd --- /dev/null +++ b/node_modules/pure-rand/package.json @@ -0,0 +1,80 @@ +{ + "name": "pure-rand", + "version": "6.0.1", + "description": " Pure random number generator written in TypeScript", + "type": "commonjs", + "main": "lib/pure-rand.js", + "exports": { + ".": { + "types": "./lib/types/pure-rand.d.ts", + "require": "./lib/pure-rand.js", + "import": "./lib/esm/pure-rand.js", + "default": "./lib/esm/pure-rand.js" + } + }, + "module": "lib/esm/pure-rand.js", + "types": "lib/types/pure-rand.d.ts", + "files": [ + "lib" + ], + "sideEffects": false, + "packageManager": "yarn@3.4.1", + "scripts": { + "format:check": "prettier --list-different .", + "format": "prettier --write .", + "build": "tsc && tsc -p ./tsconfig.declaration.json", + "build:esm": "tsc --module es2015 --outDir lib/esm --moduleResolution node && cp package.esm-template.json lib/esm/package.json", + "build:prod": "yarn build && yarn build:esm && node postbuild/main.cjs", + "build:prod-ci": "cross-env EXPECT_GITHUB_SHA=true yarn build:prod", + "test": "jest --config jest.config.js --coverage", + "build:bench:old": "tsc --outDir lib-reference/", + "build:bench:new": "tsc --outDir lib-test/", + "bench": "node perf/benchmark.cjs" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dubzzz/pure-rand.git" + }, + "author": "Nicolas DUBIEN ", + "license": "MIT", + "bugs": { + "url": "https://github.com/dubzzz/pure-rand/issues" + }, + "homepage": "https://github.com/dubzzz/pure-rand#readme", + "devDependencies": { + "@types/jest": "^29.4.0", + "@types/node": "^18.15.0", + "cross-env": "^7.0.3", + "fast-check": "^3.7.0", + "jest": "^29.5.0", + "prettier": "2.8.4", + "replace-in-file": "^6.3.5", + "source-map-support": "^0.5.21", + "tinybench": "^2.4.0", + "ts-jest": "^29.0.5", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + }, + "keywords": [ + "seed", + "random", + "prng", + "generator", + "pure", + "rand", + "mersenne", + "random number generator", + "fastest", + "fast" + ], + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] +} \ No newline at end of file diff --git a/node_modules/regexpp/index.d.ts b/node_modules/regexpp/index.d.ts deleted file mode 100644 index aa4802995..000000000 --- a/node_modules/regexpp/index.d.ts +++ /dev/null @@ -1,248 +0,0 @@ -// Generated by dts-bundle v0.7.3 - -declare module 'regexpp' { - import * as AST from "regexpp/ast"; - import { RegExpParser } from "regexpp/parser"; - import { RegExpValidator } from "regexpp/validator"; - import { RegExpVisitor } from "regexpp/visitor"; - export { AST, RegExpParser, RegExpValidator }; - export function parseRegExpLiteral(source: string | RegExp, options?: RegExpParser.Options): AST.RegExpLiteral; - export function validateRegExpLiteral(source: string, options?: RegExpValidator.Options): void; - export function visitRegExpAST(node: AST.Node, handlers: RegExpVisitor.Handlers): void; -} - -declare module 'regexpp/ast' { - export type Node = BranchNode | LeafNode; - export type BranchNode = RegExpLiteral | Pattern | Alternative | Group | CapturingGroup | Quantifier | CharacterClass | LookaroundAssertion | CharacterClassRange; - export type LeafNode = BoundaryAssertion | CharacterSet | Character | Backreference | Flags; - export type Element = Assertion | Quantifier | QuantifiableElement; - export type QuantifiableElement = Group | CapturingGroup | CharacterClass | CharacterSet | Character | Backreference | LookaheadAssertion; - export type CharacterClassElement = EscapeCharacterSet | UnicodePropertyCharacterSet | Character | CharacterClassRange; - export interface NodeBase { - type: Node["type"]; - parent: Node["parent"]; - start: number; - end: number; - raw: string; - } - export interface RegExpLiteral extends NodeBase { - type: "RegExpLiteral"; - parent: null; - pattern: Pattern; - flags: Flags; - } - export interface Pattern extends NodeBase { - type: "Pattern"; - parent: RegExpLiteral | null; - alternatives: Alternative[]; - } - export interface Alternative extends NodeBase { - type: "Alternative"; - parent: Pattern | Group | CapturingGroup | LookaroundAssertion; - elements: Element[]; - } - export interface Group extends NodeBase { - type: "Group"; - parent: Alternative | Quantifier; - alternatives: Alternative[]; - } - export interface CapturingGroup extends NodeBase { - type: "CapturingGroup"; - parent: Alternative | Quantifier; - name: string | null; - alternatives: Alternative[]; - references: Backreference[]; - } - export type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion; - export interface LookaheadAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative | Quantifier; - kind: "lookahead"; - negate: boolean; - alternatives: Alternative[]; - } - export interface LookbehindAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative; - kind: "lookbehind"; - negate: boolean; - alternatives: Alternative[]; - } - export interface Quantifier extends NodeBase { - type: "Quantifier"; - parent: Alternative; - min: number; - max: number; - greedy: boolean; - element: QuantifiableElement; - } - export interface CharacterClass extends NodeBase { - type: "CharacterClass"; - parent: Alternative | Quantifier; - negate: boolean; - elements: CharacterClassElement[]; - } - export interface CharacterClassRange extends NodeBase { - type: "CharacterClassRange"; - parent: CharacterClass; - min: Character; - max: Character; - } - export type Assertion = BoundaryAssertion | LookaroundAssertion; - export type BoundaryAssertion = EdgeAssertion | WordBoundaryAssertion; - export interface EdgeAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative | Quantifier; - kind: "start" | "end"; - } - export interface WordBoundaryAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative | Quantifier; - kind: "word"; - negate: boolean; - } - export type CharacterSet = AnyCharacterSet | EscapeCharacterSet | UnicodePropertyCharacterSet; - export interface AnyCharacterSet extends NodeBase { - type: "CharacterSet"; - parent: Alternative | Quantifier; - kind: "any"; - } - export interface EscapeCharacterSet extends NodeBase { - type: "CharacterSet"; - parent: Alternative | Quantifier | CharacterClass; - kind: "digit" | "space" | "word"; - negate: boolean; - } - export interface UnicodePropertyCharacterSet extends NodeBase { - type: "CharacterSet"; - parent: Alternative | Quantifier | CharacterClass; - kind: "property"; - key: string; - value: string | null; - negate: boolean; - } - export interface Character extends NodeBase { - type: "Character"; - parent: Alternative | Quantifier | CharacterClass | CharacterClassRange; - value: number; - } - export interface Backreference extends NodeBase { - type: "Backreference"; - parent: Alternative | Quantifier; - ref: number | string; - resolved: CapturingGroup; - } - export interface Flags extends NodeBase { - type: "Flags"; - parent: RegExpLiteral | null; - dotAll: boolean; - global: boolean; - hasIndices: boolean; - ignoreCase: boolean; - multiline: boolean; - sticky: boolean; - unicode: boolean; - } -} - -declare module 'regexpp/parser' { - import { Flags, RegExpLiteral, Pattern } from "regexpp/ast"; - import { EcmaVersion } from "regexpp/ecma-versions"; - export namespace RegExpParser { - interface Options { - strict?: boolean; - ecmaVersion?: EcmaVersion; - } - } - export class RegExpParser { - constructor(options?: RegExpParser.Options); - parseLiteral(source: string, start?: number, end?: number): RegExpLiteral; - parseFlags(source: string, start?: number, end?: number): Flags; - parsePattern(source: string, start?: number, end?: number, uFlag?: boolean): Pattern; - } -} - -declare module 'regexpp/validator' { - import { EcmaVersion } from "regexpp/ecma-versions"; - export namespace RegExpValidator { - interface Options { - strict?: boolean; - ecmaVersion?: EcmaVersion; - onLiteralEnter?(start: number): void; - onLiteralLeave?(start: number, end: number): void; - onFlags?(start: number, end: number, global: boolean, ignoreCase: boolean, multiline: boolean, unicode: boolean, sticky: boolean, dotAll: boolean, hasIndices: boolean): void; - onPatternEnter?(start: number): void; - onPatternLeave?(start: number, end: number): void; - onDisjunctionEnter?(start: number): void; - onDisjunctionLeave?(start: number, end: number): void; - onAlternativeEnter?(start: number, index: number): void; - onAlternativeLeave?(start: number, end: number, index: number): void; - onGroupEnter?(start: number): void; - onGroupLeave?(start: number, end: number): void; - onCapturingGroupEnter?(start: number, name: string | null): void; - onCapturingGroupLeave?(start: number, end: number, name: string | null): void; - onQuantifier?(start: number, end: number, min: number, max: number, greedy: boolean): void; - onLookaroundAssertionEnter?(start: number, kind: "lookahead" | "lookbehind", negate: boolean): void; - onLookaroundAssertionLeave?(start: number, end: number, kind: "lookahead" | "lookbehind", negate: boolean): void; - onEdgeAssertion?(start: number, end: number, kind: "start" | "end"): void; - onWordBoundaryAssertion?(start: number, end: number, kind: "word", negate: boolean): void; - onAnyCharacterSet?(start: number, end: number, kind: "any"): void; - onEscapeCharacterSet?(start: number, end: number, kind: "digit" | "space" | "word", negate: boolean): void; - onUnicodePropertyCharacterSet?(start: number, end: number, kind: "property", key: string, value: string | null, negate: boolean): void; - onCharacter?(start: number, end: number, value: number): void; - onBackreference?(start: number, end: number, ref: number | string): void; - onCharacterClassEnter?(start: number, negate: boolean): void; - onCharacterClassLeave?(start: number, end: number, negate: boolean): void; - onCharacterClassRange?(start: number, end: number, min: number, max: number): void; - } - } - export class RegExpValidator { - constructor(options?: RegExpValidator.Options); - validateLiteral(source: string, start?: number, end?: number): void; - validateFlags(source: string, start?: number, end?: number): void; - validatePattern(source: string, start?: number, end?: number, uFlag?: boolean): void; - } -} - -declare module 'regexpp/visitor' { - import { Alternative, Assertion, Backreference, CapturingGroup, Character, CharacterClass, CharacterClassRange, CharacterSet, Flags, Group, Node, Pattern, Quantifier, RegExpLiteral } from "regexpp/ast"; - export class RegExpVisitor { - constructor(handlers: RegExpVisitor.Handlers); - visit(node: Node): void; - } - export namespace RegExpVisitor { - interface Handlers { - onAlternativeEnter?(node: Alternative): void; - onAlternativeLeave?(node: Alternative): void; - onAssertionEnter?(node: Assertion): void; - onAssertionLeave?(node: Assertion): void; - onBackreferenceEnter?(node: Backreference): void; - onBackreferenceLeave?(node: Backreference): void; - onCapturingGroupEnter?(node: CapturingGroup): void; - onCapturingGroupLeave?(node: CapturingGroup): void; - onCharacterEnter?(node: Character): void; - onCharacterLeave?(node: Character): void; - onCharacterClassEnter?(node: CharacterClass): void; - onCharacterClassLeave?(node: CharacterClass): void; - onCharacterClassRangeEnter?(node: CharacterClassRange): void; - onCharacterClassRangeLeave?(node: CharacterClassRange): void; - onCharacterSetEnter?(node: CharacterSet): void; - onCharacterSetLeave?(node: CharacterSet): void; - onFlagsEnter?(node: Flags): void; - onFlagsLeave?(node: Flags): void; - onGroupEnter?(node: Group): void; - onGroupLeave?(node: Group): void; - onPatternEnter?(node: Pattern): void; - onPatternLeave?(node: Pattern): void; - onQuantifierEnter?(node: Quantifier): void; - onQuantifierLeave?(node: Quantifier): void; - onRegExpLiteralEnter?(node: RegExpLiteral): void; - onRegExpLiteralLeave?(node: RegExpLiteral): void; - } - } -} - -declare module 'regexpp/ecma-versions' { - export type EcmaVersion = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022; -} - diff --git a/node_modules/regexpp/index.js.map b/node_modules/regexpp/index.js.map deleted file mode 100644 index db151352f..000000000 --- a/node_modules/regexpp/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js.map","sources":[".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\ids.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\properties.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\index.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\reader.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\regexp-syntax-error.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\validator.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\parser.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\visitor.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\index.ts"}],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAE3D,SAAgB,SAAS,CAAC,EAAU;IAChC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;CAC5B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AmB;QAC1C,IAAI,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;SAC5C;QACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3B,IAAI,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;SAC5C;KACJ;CACJ;;SCzLe,kBAAkB,CAC9B,MAAuB,EACvB,OAA8B;IAE9B,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;CAChE;AAOD,SAAgB,qBAAqB,CACjC,MAAc,EACd,OAAiC;IAEjC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;CAC9D;AAED,SAAgB,cAAc,CAC1B,IAAc,EACd,QAAgC;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;CAC1C;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/regexpp/index.mjs.map b/node_modules/regexpp/index.mjs.map deleted file mode 100644 index 4263dfaec..000000000 --- a/node_modules/regexpp/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs.map","sources":[".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\ids.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\properties.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\index.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\reader.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\regexp-syntax-error.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\validator.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\parser.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\visitor.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.MSS\\dev\\regexpp\\.temp\\src\\index.ts"}],"names":[],"mappings":";;;;;;;AAIA,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAE3D,SAAgB,SAAS,CAAC,EAAU;IAChC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;CAC5B;AAED,SAAgB,YAAY,CAAC,EAAU;IACnC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO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C,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;SAC5C;QACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3B,IAAI,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;SAC5C;KACJ;CACJ;;SCzLe,kBAAkB,CAC9B,MAAuB,EACvB,OAA8B;IAE9B,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;CAChE;AAOD,SAAgB,qBAAqB,CACjC,MAAc,EACd,OAAiC;IAEjC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;CAC9D;AAED,SAAgB,cAAc,CAC1B,IAAc,EACd,QAAgC;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;CAC1C;;;;"} \ No newline at end of file diff --git a/node_modules/resolve.exports/dist/index.js b/node_modules/resolve.exports/dist/index.js index 8d54533c5..fc8a84a9c 100644 --- a/node_modules/resolve.exports/dist/index.js +++ b/node_modules/resolve.exports/dist/index.js @@ -1 +1 @@ -function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length1&&(r=t.indexOf("*",2),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n]}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g;for(;t1&&(r=t.indexOf("*",2),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n]}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t1&&(r=t.indexOf("*",2),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n]}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g;for(;t1&&(r=t.indexOf("*",2),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n]}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t[0-9]+) *\*\/\W*$/) + const testIgnoreNextLines = lineStr.match(/^\W*\/\* c8 ignore next (?[0-9]+)/) if (testIgnoreNextLines) { return { count: Number(testIgnoreNextLines.groups.count) } } // Check if comment is on its own line. - if (lineStr.match(/^\W*\/\* c8 ignore next *\*\/\W*$/)) { + if (lineStr.match(/^\W*\/\* c8 ignore next/)) { return { count: 1 } } - if (lineStr.match(/\/\* c8 ignore next \*\//)) { + if (lineStr.match(/\/\* c8 ignore next/)) { // Won't ignore successive lines, but the current line will be ignored. return { count: 0 } } - const testIgnoreStartStop = lineStr.match(/\/\* c8 ignore (?start|stop) *\*\//) + const testIgnoreStartStop = lineStr.match(/\/\* c8 ignore (?start|stop)/) if (testIgnoreStartStop) { if (testIgnoreStartStop.groups.mode === 'start') return { start: true } if (testIgnoreStartStop.groups.mode === 'stop') return { stop: true } diff --git a/node_modules/v8-to-istanbul/package.json b/node_modules/v8-to-istanbul/package.json index c2443342e..303173d01 100644 --- a/node_modules/v8-to-istanbul/package.json +++ b/node_modules/v8-to-istanbul/package.json @@ -1,6 +1,6 @@ { "name": "v8-to-istanbul", - "version": "9.0.1", + "version": "9.1.0", "description": "convert from v8 coverage format to istanbul's format", "main": "index.js", "types": "index.d.ts", @@ -30,7 +30,7 @@ "convert-source-map": "^1.6.0" }, "devDependencies": { - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "c8": "^7.2.1", "semver": "^7.3.2", "should": "13.2.3", diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json index 5c9bce457..86e2a0fba 100644 --- a/node_modules/write-file-atomic/package.json +++ b/node_modules/write-file-atomic/package.json @@ -1,6 +1,6 @@ { "name": "write-file-atomic", - "version": "5.0.0", + "version": "4.0.2", "description": "Write files in an atomic fashion w/configurable ownership", "main": "./lib/index.js", "scripts": { @@ -8,6 +8,9 @@ "posttest": "npm run lint", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", "lintfix": "npm run lint -- --fix", "snap": "tap", "template-oss-apply": "template-oss-apply --force" @@ -32,7 +35,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", + "@npmcli/template-oss": "3.5.0", "mkdirp": "^1.0.4", "rimraf": "^3.0.2", "tap": "^16.0.1" @@ -42,17 +45,11 @@ "lib/" ], "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "4.5.1" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] + "version": "3.5.0" } } diff --git a/node_modules/yargs/browser.d.ts b/node_modules/yargs/browser.d.ts new file mode 100644 index 000000000..21f3fc691 --- /dev/null +++ b/node_modules/yargs/browser.d.ts @@ -0,0 +1,5 @@ +import {YargsFactory} from './build/lib/yargs-factory'; + +declare const Yargs: ReturnType; + +export default Yargs; diff --git a/node_modules/yargs/build/index.cjs b/node_modules/yargs/build/index.cjs index 9641ad840..b64056758 100644 --- a/node_modules/yargs/build/index.cjs +++ b/node_modules/yargs/build/index.cjs @@ -1 +1 @@ -"use strict";var t=require("assert");class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let s,i=[];function n(t,o,a,h){s=h;let l={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return l;const r=/\.json|\..*rc$/.test(t.extends);let h=null;if(r)h=function(t,e){return s.path.resolve(t,e)}(o,t.extends);else try{h=require.resolve(t.extends)}catch(e){return t}!function(t){if(i.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(h),i.push(h),l=r?JSON.parse(s.readFileSync(h,"utf8")):require(t.extends),delete t.extends,l=n(l,s.path.dirname(h),a,s)}return i=[],a?r(l,t):Object.assign({},l,t)}function r(t,e){const s={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(s,t);for(const n of Object.keys(e))i(e[n])&&i(s[n])?s[n]=r(t[n],e[n]):s[n]=e[n];return s}function o(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),s=/\.*[\][<>]/g,i=e.shift();if(!i)throw new Error(`No command found in: ${t}`);const n={cmd:i.replace(s,""),demanded:[],optional:[]};return e.forEach(((t,i)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&i===e.length-1&&(r=!0),/^\[/.test(t)?n.optional.push({cmd:t.replace(s,"").split("|"),variadic:r}):n.demanded.push({cmd:t.replace(s,"").split("|"),variadic:r})})),n}const a=["first","second","third","fourth","fifth","sixth"];function h(t,s,i){try{let n=0;const[r,a,h]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,i],f=[].slice.call(a);for(;f.length&&void 0===f[f.length-1];)f.pop();const d=h||f.length;if(du)throw new e(`Too many arguments provided. Expected max ${u} but received ${d}.`);r.demanded.forEach((t=>{const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1})),r.optional.forEach((t=>{if(0===f.length)return;const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,i){throw new e(`Invalid ${a[i]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,e,s,i){s.assert.notStrictEqual(t,e,i)}function u(t,e){e.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},e=(()=>!0)){const s={};return p(t).forEach((i=>{e(i,t[i])&&(s[i]=t[i])})),s}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var b=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function O(t,e,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,s):n?n.value=s:e.set(t,s),s}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,s=!0,i=!1){if(h(" [boolean] [boolean] [boolean]",[t,e,s],arguments.length),Array.isArray(t)){for(let i=0;i{const i=[...s[e]||[],e];return!t.option||!i.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,e,s,i){return s.reduce(((t,s)=>{if(s.applyBeforeValidation!==i)return t;if(s.mutates){if(s.applied)return t;s.applied=!0}if(f(t))return t.then((t=>Promise.all([t,s(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const i=s(t,e);return f(i)?i.then((e=>Object.assign(t,e))):Object.assign(t,i)}}),t)}function j(t,e,s=(t=>{throw t})){try{const s="function"==typeof t?t():t;return f(s)?s.then((t=>e(t))):e(s)}catch(t){return s(t)}}const _=/(^\*)|(^\$0)/;class M{constructor(t,e,s,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=s,this.validation=e}addDirectory(t,e,s,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:t=>t;i.visit=(t,e,s)=>{const i=n(t,e,s);if(i){if(this.requireCache.has(e))return i;this.requireCache.add(e),this.addHandler(i)}return i},this.shim.requireDirectory({require:e,filename:s},t,i)}addHandler(t,e,s,i,n,r){let a=[];const h=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(n);if(i=i||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...a]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(s))return void this.addHandler([t].concat(a),e,s.builder,s.handler,s.middlewares,s.deprecated)}if("string"==typeof t){const n=o(t);a=a.map((t=>o(t).cmd));let l=!1;const c=[n.cmd].concat(a).filter((t=>!_.test(t)||(l=!0,!1)));0===c.length&&l&&c.push("$0"),l&&(n.cmd=c[0],a=c.slice(1),t=t.replace(_,n.cmd)),a.forEach((t=>{this.aliasMap[t]=n.cmd})),!1!==e&&this.usage.command(t,e,l,a,r),this.handlers[n.cmd]={original:t,description:e,handler:i,builder:s||{},middlewares:h,deprecated:r,demanded:n.demanded,optional:n.optional},l&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,s,i,n,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),h=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,e,s.aliases,h,i,n,r);return f(c)?c.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,n,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,n,c.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,s,i,n,r,o,a){const h=e.builder;let l=s;if(x(h)){const c=h(s.getInternalMethods().reset(i),a);if(f(c))return c.then((i=>{var a;return l=(a=i)&&"function"==typeof a.getInternalMethods?i:s,this.parseAndUpdateUsage(t,e,l,n,r,o)}))}else(function(t){return"object"==typeof t})(h)&&(l=s.getInternalMethods().reset(i),Object.keys(e.builder).forEach((t=>{l.option(t,h[t])})));return this.parseAndUpdateUsage(t,e,l,n,r,o)}parseAndUpdateUsage(t,e,s,i,n,r){t&&s.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(s)&&s.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,e),e.description);const o=s.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,r);return f(o)?o.then((t=>({aliases:s.parsed.aliases,innerArgv:t}))):{aliases:s.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const s=_.test(e.original)?e.original.replace(_,"").trim():e.original,i=t.filter((t=>!_.test(t)));return i.push(s),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,e,s,i,n,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(n,a,r.parsed.error,t);s=j(s,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const i=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(s,i,!1,!1),s=j(s=C(s,r,o,!1),(t=>{const s=e.handler(t);return f(s)?s.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(s)&&!r.getInternalMethods().hasParseCallback()&&s.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(i.commands.pop(),i.fullCommands.pop()),s}applyMiddlewareAndGetResult(t,e,s,i,n,r,o){let a={};if(n)return s;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,s,i,o));const h=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=C(s,o,h,!0);return f(l)?l.then((s=>this.handleValidationAndGetResult(t,e,s,i,r,o,h,a))):this.handleValidationAndGetResult(t,e,l,i,r,o,h,a)}populatePositionals(t,e,s,i){e._=e._.slice(s.commands.length);const n=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(n.length,e._.length);n.length;){const t=n.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=s.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),i),o}populatePositional(t,e,s){const i=t.cmd[0];t.variadic?s[i]=e._.splice(0).map(String):e._.length&&(s[i]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},s=o(t);return s.demanded.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i,e.demand[s]=!0})),s.optional.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i})),e}postProcessPositionals(t,e,s,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(s.default,n.default);for(const t of Object.keys(s.alias))n.alias[t]=(n.alias[t]||[]).concat(s.alias[t]);n.array=n.array.concat(s.array),n.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{n.configuration["unknown-options-as-args"]&&(n.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const s=Object.keys(e);Object.keys(e).forEach((t=>{s.push(...a.aliases[t])})),Object.keys(a.argv).forEach((n=>{s.includes(n)&&(e[n]||(e[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(t,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(t[n])||Array.isArray(a.argv[n]))?t[n]=[].concat(t[n],a.argv[n]):t[n]=a.argv[n])}))}}isDefaulted(t,e){const{default:s}=t.getOptions();return Object.prototype.hasOwnProperty.call(s,e)||Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:s}=t.getOptions();return s.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||s.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=_.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(x(e))return e(t,!0);k(e)||Object.keys(e).forEach((s=>{t.option(s,e[s])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,s=0,i=Object.keys(require.cache);s{const s=e;s._handle&&s.isTTY&&"function"==typeof s._handle.setBlocking&&s._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const i=s.y18n.__,n={},r=[];n.failFn=function(t){r.push(t)};let o=null,a=null,h=!0;n.showHelpOnFail=function(e=!0,s){const[i,r]="string"==typeof e?[!0,e]:[e,s];return t.getInternalMethods().isGlobalContext()&&(a=r),o=r,h=i,n};let l=!1;n.fail=function(s,i){const c=t.getInternalMethods().getLoggerInstance();if(!r.length){if(t.getExitProcess()&&E(!0),!l){l=!0,h&&(t.showHelp("error"),c.error()),(s||i)&&c.error(s||i);const e=o||a;e&&((s||i)&&c.error(""),c.error(e))}if(i=i||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,i);throw i}for(let t=r.length-1;t>=0;--t){const e=r[t];if(A(e)){if(i)throw i;if(s)throw Error(s)}else e(s,i,n)}};let c=[],f=!1;n.usage=(t,e)=>null===t?(f=!0,c=[],n):(f=!1,c.push([t,e||""]),n),n.getUsage=()=>c,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>i("Positionals:");let d=[];n.example=(t,e)=>{d.push([t,e||""])};let u=[];n.command=function(t,e,s,i,n=!1){s&&(u=u.map((t=>(t[2]=!1,t)))),u.push([t,e||"",s,i,n])},n.getCommands=()=>u;let p={};n.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{n.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{n.describe(e,t[e])})):p[t]=e},n.getDescriptions=()=>p;let m=[];n.epilog=t=>{m.push(t)};let y,b=!1;n.wrap=t=>{b=!0,y=t},n.getWrap=()=>s.getEnv("YARGS_DISABLE_WRAP")?null:(b||(y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),b=!0),y);const v="__yargsString__:";function O(t,e,i){let n=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{n=Math.max(s.stringWidth(i?`${i} ${I(t[0])}`:I(t[0]))+$(t[0]),n)})),e&&(n=Math.min(n,parseInt((.5*e).toString(),10))),n}let w;function C(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function j(t,e){let s=`[${i("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}n.deferY18nLookup=t=>v+t,n.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),s=t.getOptions();(Object.keys(s.alias)||[]).forEach((i=>{s.alias[i].forEach((r=>{p[r]&&n.describe(i,p[r]),r in e&&t.demandOption(i,e[r]),s.boolean.includes(r)&&t.boolean(i),s.count.includes(r)&&t.count(i),s.string.includes(r)&&t.string(i),s.normalize.includes(r)&&t.normalize(i),s.array.includes(r)&&t.array(i),s.number.includes(r)&&t.number(i)}))}))}();const e=t.customScriptName?t.$0:s.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),h=t.getGroups(),l=t.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(l.default)),g=g.filter(C),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const y=n.getWrap(),b=s.cliui({width:y,wrap:!!y});if(!f)if(c.length)c.forEach((t=>{b.div({text:`${t[0].replace(/\$0/g,e)}`}),t[1]&&b.div({text:`${t[1]}`,padding:[1,0,0,0]})})),b.div();else if(u.length){let t=null;t=o._?`${e} <${i("command")}>\n`:`${e} [${i("command")}]\n`,b.div(`${t}`)}if(u.length>1||1===u.length&&!u[0][2]){b.div(i("Commands:"));const s=t.getInternalMethods().getContext(),n=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(u=u.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=e?`${e} `:"";u.forEach((t=>{const s=`${r}${n}${t[0].replace(/^\$0 ?/,"")}`;b.span({text:s,padding:[0,2,0,2],width:O(u,y,`${e}${n}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${i("default")}]`),t[3]&&t[3].length&&o.push(`[${i("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${i("deprecated: %s",t[4])}]`):o.push(`[${i("deprecated")}]`)),o.length?b.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):b.div()})),b.div()}const _=(Object.keys(l.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&_.every((t=>-1===(l.alias[t]||[]).indexOf(e)))));const M=i("Options:");h[M]||(h[M]=[]),function(t,e,s,i){let n=[],r=null;Object.keys(s).forEach((t=>{n=n.concat(s[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==n.indexOf(t)))||s[i].push(t)}))}(g,l.alias,h,M);const k=t=>/^--/.test(I(t)),x=Object.keys(h).filter((t=>h[t].length>0)).map((t=>({groupName:t,normalizedKeys:h[t].filter(C).map((t=>{if(_.includes(t))return t;for(let e,s=0;void 0!==(e=_[s]);s++)if((l.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const s=e.reduce(((e,s)=>(e[s]=[s].concat(l.alias[s]||[]).map((e=>t===n.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?l.boolean.includes(s)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>k(t)===k(e)?0:k(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:s}}));if(x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>k(e[t])))))&&x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var s,i;k(e[t])&&(e[t]=(s=e[t],i="-x, ".length,S(s)?{text:s.text,indentation:s.indentation+i}:{text:s,indentation:i}))}))})),x.forEach((({groupName:t,normalizedKeys:e,switches:s})=>{b.div(t),e.forEach((t=>{const e=s[t];let o=p[t]||"",h=null;o.includes(v)&&(o=i(o.substring(v.length))),l.boolean.includes(t)&&(h=`[${i("boolean")}]`),l.count.includes(t)&&(h=`[${i("count")}]`),l.string.includes(t)&&(h=`[${i("string")}]`),l.normalize.includes(t)&&(h=`[${i("string")}]`),l.array.includes(t)&&(h=`[${i("array")}]`),l.number.includes(t)&&(h=`[${i("number")}]`);const c=[t in a?(f=a[t],"string"==typeof f?`[${i("deprecated: %s",f)}]`:`[${i("deprecated")}]`):null,h,t in r?`[${i("required")}]`:null,l.choices&&l.choices[t]?`[${i("choices:")} ${n.stringifiedValues(l.choices[t])}]`:null,j(l.default[t],l.defaultDescription[t])].filter(Boolean).join(" ");var f;b.span({text:I(e),padding:[0,2,0,2+$(e)],width:O(s,y)+4},o),c?b.div({text:c,padding:[0,0,0,2],align:"right"}):b.div()})),b.div()})),d.length&&(b.div(i("Examples:")),d.forEach((t=>{t[0]=t[0].replace(/\$0/g,e)})),d.forEach((t=>{""===t[1]?b.div({text:t[0],padding:[0,2,0,2]}):b.div({text:t[0],padding:[0,2,0,2],width:O(d,y)+4},{text:t[1]})})),b.div()),m.length>0){const t=m.map((t=>t.replace(/\$0/g,e))).join("\n");b.div(`${t}\n`)}return b.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w},n.showHelp=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(n.help())},n.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):i("generated-value"),")"].join(""),n.stringifiedValues=function(t,e){let s="";const i=e||", ",n=[].concat(t);return t&&n.length?(n.forEach((t=>{s.length&&(s+=i),s+=JSON.stringify(t)})),s):s};let _=null;n.version=t=>{_=t},n.showVersion=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(_)},n.reset=function(t){return o=null,l=!1,c=[],f=!1,m=[],d=[],u=[],p=g(p,(e=>!t[e])),n};const M=[];return n.freeze=function(){M.push({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p})},n.unfreeze=function(t=!1){const e=M.pop();e&&(t?(p={...e.descriptions,...p},u=[...e.commands,...u],c=[...e.usages,...c],d=[...e.examples,...d],m=[...e.epilogs,...m]):({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p}=e))},n}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,e,s,i){var n,r,o;this.yargs=t,this.usage=e,this.command=s,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,s,i){const n=this.command.getCommandHandlers();for(let e=0,s=t.length;e{const i=o(s[0]).cmd;if(-1===e.indexOf(i))if(this.zshShell){const e=s[1]||"";t.push(i.replace(/:/g,"\\:")+":"+e)}else t.push(i)}))}optionCompletions(t,e,s,i){if((i.match(/^-/)||""===i&&0===t.length)&&!this.previousArgHasChoices(e)){const s=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach((r=>{const o=!!s.configuration["boolean-negation"]&&s.boolean.includes(r);n.includes(r)||s.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||(this.completeOptionKey(r,t,i),o&&s.default[r]&&this.completeOptionKey(`no-${r}`,t,i))}))}}choicesFromOptionsCompletions(t,e,s,i){if(this.previousArgHasChoices(e)){const s=this.getPreviousArgChoices(e);s&&s.length>0&&t.push(...s.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,s,i){if(""===i&&t.length>0&&this.previousArgHasChoices(e))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[s._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(i)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],s="";if(!e.startsWith("-")&&t.length>1&&(s=e,e=t[t.length-2]),!e.startsWith("-"))return;const i=e.replace(/^-+/,""),n=this.yargs.getOptions(),r=[i,...this.yargs.getAliases()[i]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(n.key,t)&&Array.isArray(n.choices[t])){o=n.choices[t];break}return o?o.filter((t=>!s||t.startsWith(s))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,s){const i=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(i(e))return!0;if(s&&i(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(i(t))return!0;return!1}completeOptionKey(t,e,s){const i=this.usage.getDescriptions(),n=!/^--/.test(s)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";if(this.zshShell){const s=i[t]||"";e.push(n+`${t.replace(/:/g,"\\:")}:${s.replace("__yargsString__:","")}`)}else e.push(n+t)}customCompletion(t,e,s,i){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(s,e);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{i(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{i(t,void 0)}))})):i(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(s,e,((n=i)=>this.defaultCompletion(t,e,s,n)),(t=>{i(null,t)})):this.customCompletionFunction(s,e,(t=>{i(null,t)}))}getCompletion(t,e){const s=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),n=this.customCompletionFunction?i=>this.customCompletion(t,i,s,e):i=>this.defaultCompletion(t,i,s,e);return f(i)?i.then(n):n(i)}generateCompletionScript(t,e){let s=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),s=s.replace(/{{app_name}}/g,i),s=s.replace(/{{completion_command}}/g,e),s.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const s=[];let i,n;for(i=0;i<=e.length;i++)s[i]=[i];for(n=0;n<=t.length;n++)s[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?s[i][n]=s[i-1][n-1]:i>1&&n>1&&e.charAt(i-2)===t.charAt(n-1)&&e.charAt(i-1)===t.charAt(n-2)?s[i][n]=s[i-2][n-2]+1:s[i][n]=Math.min(s[i-1][n-1]+1,Math.min(s[i][n-1]+1,s[i-1][n]+1));return s[e.length][t.length]}const H=["$0","--","_"];var W,z,q,F,U,L,V,G,R,T,B,K,Y,J,Z,X,Q,tt,et,st,it,nt,rt,ot,at,ht,lt,ct,ft,dt,ut,pt,gt,mt;const yt=Symbol("copyDoubleDash"),bt=Symbol("copyDoubleDash"),vt=Symbol("deleteFromParserHintObject"),Ot=Symbol("emitWarning"),wt=Symbol("freeze"),Ct=Symbol("getDollarZero"),jt=Symbol("getParserConfiguration"),_t=Symbol("guessLocale"),Mt=Symbol("guessVersion"),kt=Symbol("parsePositionalNumbers"),xt=Symbol("pkgUp"),Et=Symbol("populateParserHintArray"),At=Symbol("populateParserHintSingleValueDictionary"),Pt=Symbol("populateParserHintArrayDictionary"),St=Symbol("populateParserHintDictionary"),$t=Symbol("sanitizeKey"),It=Symbol("setKey"),Dt=Symbol("unfreeze"),Nt=Symbol("validateAsync"),Ht=Symbol("getCommandInstance"),Wt=Symbol("getContext"),zt=Symbol("getHasOutput"),qt=Symbol("getLoggerInstance"),Ft=Symbol("getParseContext"),Ut=Symbol("getUsageInstance"),Lt=Symbol("getValidationInstance"),Vt=Symbol("hasParseCallback"),Gt=Symbol("isGlobalContext"),Rt=Symbol("postProcess"),Tt=Symbol("rebase"),Bt=Symbol("reset"),Kt=Symbol("runYargsParserAndExecuteCommands"),Yt=Symbol("runValidation"),Jt=Symbol("setHasOutput"),Zt=Symbol("kTrackManuallySetKeys");class Xt{constructor(t=[],e,s,i){this.customScriptName=!1,this.parsed=!1,W.set(this,void 0),z.set(this,void 0),q.set(this,{commands:[],fullCommands:[]}),F.set(this,null),U.set(this,null),L.set(this,"show-hidden"),V.set(this,null),G.set(this,!0),R.set(this,{}),T.set(this,!0),B.set(this,[]),K.set(this,void 0),Y.set(this,{}),J.set(this,!1),Z.set(this,null),X.set(this,!0),Q.set(this,void 0),tt.set(this,""),et.set(this,void 0),st.set(this,void 0),it.set(this,{}),nt.set(this,null),rt.set(this,null),ot.set(this,{}),at.set(this,{}),ht.set(this,void 0),lt.set(this,!1),ct.set(this,void 0),ft.set(this,!1),dt.set(this,!1),ut.set(this,!1),pt.set(this,void 0),gt.set(this,null),mt.set(this,void 0),O(this,ct,i,"f"),O(this,ht,t,"f"),O(this,z,e,"f"),O(this,st,s,"f"),O(this,K,new w(this),"f"),this.$0=this[Ct](),this[Bt](),O(this,W,v(this,W,"f"),"f"),O(this,pt,v(this,pt,"f"),"f"),O(this,mt,v(this,mt,"f"),"f"),O(this,et,v(this,et,"f"),"f"),v(this,et,"f").showHiddenOpt=v(this,L,"f"),O(this,Q,this[bt](),"f")}addHelpOpt(t,e){return h("[string|boolean] [string]",[t,e],arguments.length),v(this,Z,"f")&&(this[vt](v(this,Z,"f")),O(this,Z,null,"f")),!1===t&&void 0===e||(O(this,Z,"string"==typeof t?t:"help","f"),this.boolean(v(this,Z,"f")),this.describe(v(this,Z,"f"),e||v(this,pt,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(h("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const s="string"==typeof t?t:v(this,L,"f");return this.boolean(s),this.describe(s,e||v(this,pt,"f").deferY18nLookup("Show hidden options")),v(this,et,"f").showHiddenOpt=s,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return h(" [string|array]",[t,e],arguments.length),this[Pt](this.alias.bind(this),"alias",t,e),this}array(t){return h("",[t],arguments.length),this[Et]("array",t),this[Zt](t),this}boolean(t){return h("",[t],arguments.length),this[Et]("boolean",t),this[Zt](t),this}check(t,e){return h(" [boolean]",[t,e],arguments.length),this.middleware(((e,s)=>j((()=>t(e,s.getOptions())),(s=>(s?("string"==typeof s||s instanceof Error)&&v(this,pt,"f").fail(s.toString(),s):v(this,pt,"f").fail(v(this,ct,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(v(this,pt,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return h(" [string|array]",[t,e],arguments.length),this[Pt](this.choices.bind(this),"choices",t,e),this}coerce(t,s){if(h(" [function]",[t,s],arguments.length),Array.isArray(t)){if(!s)throw new e("coerce callback must be provided");for(const e of t)this.coerce(e,s);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!s)throw new e("coerce callback must be provided");return v(this,et,"f").key[t]=!0,v(this,K,"f").addCoerceMiddleware(((i,n)=>{let r;return Object.prototype.hasOwnProperty.call(i,t)?j((()=>(r=n.getAliases(),s(i[t]))),(e=>{i[t]=e;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(r[t]&&!0!==s)for(const s of r[t])i[s]=e;return i}),(t=>{throw new e(t.message)})):i}),t),this}conflicts(t,e){return h(" [string|array]",[t,e],arguments.length),v(this,mt,"f").conflicts(t,e),this}config(t="config",e,s){return h("[object|string] [string|function] [function]",[t,e,s],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(s=e,e=void 0),this.describe(t,e||v(this,pt,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{v(this,et,"f").config[t]=s||!0})),this):(t=n(t,v(this,z,"f"),this[jt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(t),this)}completion(t,e,s){return h("[string] [string|boolean|function] [function]",[t,e,s],arguments.length),"function"==typeof e&&(s=e,e=void 0),O(this,U,t||v(this,U,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(v(this,U,"f"),e),s&&v(this,F,"f").registerFunction(s),this}command(t,e,s,i,n,r){return h(" [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,s,i,n,r],arguments.length),v(this,W,"f").addHandler(t,e,s,i,n,r),this}commands(t,e,s,i,n,r){return this.command(t,e,s,i,n,r)}commandDir(t,e){h(" [object]",[t,e],arguments.length);const s=v(this,st,"f")||v(this,ct,"f").require;return v(this,W,"f").addDirectory(t,s,v(this,ct,"f").getCallerFile(),e),this}count(t){return h("",[t],arguments.length),this[Et]("count",t),this[Zt](t),this}default(t,e,s){return h(" [*] [string]",[t,e,s],arguments.length),s&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]=s),"function"==typeof e&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]||(v(this,et,"f").defaultDescription[t]=v(this,pt,"f").functionDescription(e)),e=e.call()),this[At](this.default.bind(this),"default",t,e),this}defaults(t,e,s){return this.default(t,e,s)}demandCommand(t=1,e,s,i){return h("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,s,i],arguments.length),"number"!=typeof e&&(s=e,e=1/0),this.global("_",!1),v(this,et,"f").demandedCommands._={min:t,max:e,minMsg:s,maxMsg:i},this}demand(t,e,s){return Array.isArray(e)?(e.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})),e=1/0):"number"!=typeof e&&(s=e,e=1/0),"number"==typeof t?(d(s,!0,v(this,ct,"f")),this.demandCommand(t,e,s,s)):Array.isArray(t)?t.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})):"string"==typeof s?this.demandOption(t,s):!0!==s&&void 0!==s||this.demandOption(t),this}demandOption(t,e){return h(" [string]",[t,e],arguments.length),this[At](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return h(" [string|boolean]",[t,e],arguments.length),v(this,et,"f").deprecatedOptions[t]=e,this}describe(t,e){return h(" [string]",[t,e],arguments.length),this[It](t,!0),v(this,pt,"f").describe(t,e),this}detectLocale(t){return h("",[t],arguments.length),O(this,G,t,"f"),this}env(t){return h("[string|boolean]",[t],arguments.length),!1===t?delete v(this,et,"f").envPrefix:v(this,et,"f").envPrefix=t||"",this}epilogue(t){return h("",[t],arguments.length),v(this,pt,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return h(" [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):v(this,pt,"f").example(t,e),this}exit(t,e){O(this,J,!0,"f"),O(this,V,e,"f"),v(this,T,"f")&&v(this,ct,"f").process.exit(t)}exitProcess(t=!0){return h("[boolean]",[t],arguments.length),O(this,T,t,"f"),this}fail(t){if(h("",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new e("Invalid first argument. Expected function or boolean 'false'");return v(this,pt,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return h(" [function]",[t,e],arguments.length),e?v(this,F,"f").getCompletion(t,e):new Promise(((e,s)=>{v(this,F,"f").getCompletion(t,((t,i)=>{t?s(t):e(i)}))}))}getDemandedOptions(){return h([],0),v(this,et,"f").demandedOptions}getDemandedCommands(){return h([],0),v(this,et,"f").demandedCommands}getDeprecatedOptions(){return h([],0),v(this,et,"f").deprecatedOptions}getDetectLocale(){return v(this,G,"f")}getExitProcess(){return v(this,T,"f")}getGroups(){return Object.assign({},v(this,Y,"f"),v(this,at,"f"))}getHelp(){if(O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Kt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(t))return t.then((()=>v(this,pt,"f").help()))}const t=v(this,W,"f").runDefaultBuilderOn(this);if(f(t))return t.then((()=>v(this,pt,"f").help()))}return Promise.resolve(v(this,pt,"f").help())}getOptions(){return v(this,et,"f")}getStrict(){return v(this,ft,"f")}getStrictCommands(){return v(this,dt,"f")}getStrictOptions(){return v(this,ut,"f")}global(t,e){return h(" [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?v(this,et,"f").local=v(this,et,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{v(this,et,"f").local.includes(t)||v(this,et,"f").local.push(t)})),this}group(t,e){h(" ",[t,e],arguments.length);const s=v(this,at,"f")[e]||v(this,Y,"f")[e];v(this,at,"f")[e]&&delete v(this,at,"f")[e];const i={};return v(this,Y,"f")[e]=(s||[]).concat(t).filter((t=>!i[t]&&(i[t]=!0))),this}hide(t){return h("",[t],arguments.length),v(this,et,"f").hiddenOptions.push(t),this}implies(t,e){return h(" [number|string|array]",[t,e],arguments.length),v(this,mt,"f").implies(t,e),this}locale(t){return h("[string]",[t],arguments.length),void 0===t?(this[_t](),v(this,ct,"f").y18n.getLocale()):(O(this,G,!1,"f"),v(this,ct,"f").y18n.setLocale(t),this)}middleware(t,e,s){return v(this,K,"f").addMiddleware(t,!!e,s)}nargs(t,e){return h(" [number]",[t,e],arguments.length),this[At](this.nargs.bind(this),"narg",t,e),this}normalize(t){return h("",[t],arguments.length),this[Et]("normalize",t),this}number(t){return h("",[t],arguments.length),this[Et]("number",t),this[Zt](t),this}option(t,e){if(h(" [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Zt](t),!v(this,gt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[Ot](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),v(this,et,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const s=e.deprecate||e.deprecated;s&&this.deprecateOption(t,s);const i=e.demand||e.required||e.require;i&&this.demand(t,i),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(v(this,et,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const n=e.describe||e.description||e.desc,r=v(this,pt,"f").getDescriptions();Object.prototype.hasOwnProperty.call(r,t)&&"string"!=typeof n||this.describe(t,n),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,s){h("[string|array] [function|boolean|object] [function]",[t,e,s],arguments.length),this[wt](),void 0===t&&(t=v(this,ht,"f")),"object"==typeof e&&(O(this,rt,e,"f"),e=s),"function"==typeof e&&(O(this,nt,e,"f"),e=!1),e||O(this,ht,t,"f"),v(this,nt,"f")&&O(this,T,!1,"f");const i=this[Kt](t,!!e),n=this.parsed;return v(this,F,"f").setParsed(this.parsed),f(i)?i.then((t=>(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),t,v(this,tt,"f")),t))).catch((t=>{throw v(this,nt,"f")&&v(this,nt,"f")(t,this.parsed.argv,v(this,tt,"f")),t})).finally((()=>{this[Dt](),this.parsed=n})):(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),i,v(this,tt,"f")),this[Dt](),this.parsed=n,i)}parseAsync(t,e,s){const i=this.parse(t,e,s);return f(i)?i:Promise.resolve(i)}parseSync(t,s,i){const n=this.parse(t,s,i);if(f(n))throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return h("",[t],arguments.length),O(this,it,t,"f"),this}pkgConf(t,e){h(" [string]",[t,e],arguments.length);let s=null;const i=this[xt](e||v(this,z,"f"));return i[t]&&"object"==typeof i[t]&&(s=n(i[t],e||v(this,z,"f"),this[jt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(s)),this}positional(t,e){h(" ",[t,e],arguments.length);const s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=g(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&s.includes(t)));const i=v(this,q,"f").fullCommands[v(this,q,"f").fullCommands.length-1],n=i?v(this,W,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return p(n).forEach((s=>{const i=n[s];Array.isArray(i)?-1!==i.indexOf(t)&&(e[s]=!0):i[t]&&!(s in e)&&(e[s]=i[t])})),this.group(t,v(this,pt,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return h("[boolean]",[t],arguments.length),O(this,lt,t,"f"),this}required(t,e,s){return this.demand(t,e,s)}require(t,e,s){return this.demand(t,e,s)}requiresArg(t){return h(" [number]",[t],arguments.length),"string"==typeof t&&v(this,et,"f").narg[t]||this[At](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return h("[string] [string]",[t,e],arguments.length),t=t||this.$0,v(this,Q,"f").log(v(this,F,"f").generateCompletionScript(t,e||v(this,U,"f")||"completion")),this}showHelp(t){if(h("[string|function]",[t],arguments.length),O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Kt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}const e=v(this,W,"f").runDefaultBuilderOn(this);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}return v(this,pt,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return h("[boolean|string] [string]",[t,e],arguments.length),v(this,pt,"f").showHelpOnFail(t,e),this}showVersion(t){return h("[string|function]",[t],arguments.length),v(this,pt,"f").showVersion(t),this}skipValidation(t){return h("",[t],arguments.length),this[Et]("skipValidation",t),this}strict(t){return h("[boolean]",[t],arguments.length),O(this,ft,!1!==t,"f"),this}strictCommands(t){return h("[boolean]",[t],arguments.length),O(this,dt,!1!==t,"f"),this}strictOptions(t){return h("[boolean]",[t],arguments.length),O(this,ut,!1!==t,"f"),this}string(t){return h("",[t],arguments.length),this[Et]("string",t),this[Zt](t),this}terminalWidth(){return h([],0),v(this,ct,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return h("",[t],arguments.length),O(this,G,!1,"f"),v(this,ct,"f").y18n.updateLocale(t),this}usage(t,s,i,n){if(h(" [string|boolean] [function|object] [function]",[t,s,i,n],arguments.length),void 0!==s){if(d(t,null,v(this,ct,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,s,i,n);throw new e(".usage() description must start with $0 if being used as alias for .command()")}return v(this,pt,"f").usage(t),this}version(t,e,s){const i="version";if(h("[boolean|string] [string] [string]",[t,e,s],arguments.length),v(this,gt,"f")&&(this[vt](v(this,gt,"f")),v(this,pt,"f").version(void 0),O(this,gt,null,"f")),0===arguments.length)s=this[Mt](),t=i;else if(1===arguments.length){if(!1===t)return this;s=t,t=i}else 2===arguments.length&&(s=e,e=void 0);return O(this,gt,"string"==typeof t?t:i,"f"),e=e||v(this,pt,"f").deferY18nLookup("Show version number"),v(this,pt,"f").version(s||void 0),this.boolean(v(this,gt,"f")),this.describe(v(this,gt,"f"),e),this}wrap(t){return h("",[t],arguments.length),v(this,pt,"f").wrap(t),this}[(W=new WeakMap,z=new WeakMap,q=new WeakMap,F=new WeakMap,U=new WeakMap,L=new WeakMap,V=new WeakMap,G=new WeakMap,R=new WeakMap,T=new WeakMap,B=new WeakMap,K=new WeakMap,Y=new WeakMap,J=new WeakMap,Z=new WeakMap,X=new WeakMap,Q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,ht=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[bt](){return{log:(...t)=>{this[Vt]()||console.log(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")},error:(...t)=>{this[Vt]()||console.error(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")}}}[vt](t){p(v(this,et,"f")).forEach((e=>{if("configObjects"===e)return;const s=v(this,et,"f")[e];Array.isArray(s)?s.includes(t)&&s.splice(s.indexOf(t),1):"object"==typeof s&&delete s[t]})),delete v(this,pt,"f").getDescriptions()[t]}[Ot](t,e,s){v(this,R,"f")[s]||(v(this,ct,"f").process.emitWarning(t,e),v(this,R,"f")[s]=!0)}[wt](){v(this,B,"f").push({options:v(this,et,"f"),configObjects:v(this,et,"f").configObjects.slice(0),exitProcess:v(this,T,"f"),groups:v(this,Y,"f"),strict:v(this,ft,"f"),strictCommands:v(this,dt,"f"),strictOptions:v(this,ut,"f"),completionCommand:v(this,U,"f"),output:v(this,tt,"f"),exitError:v(this,V,"f"),hasOutput:v(this,J,"f"),parsed:this.parsed,parseFn:v(this,nt,"f"),parseContext:v(this,rt,"f")}),v(this,pt,"f").freeze(),v(this,mt,"f").freeze(),v(this,W,"f").freeze(),v(this,K,"f").freeze()}[Ct](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(v(this,ct,"f").process.argv()[0])?v(this,ct,"f").process.argv().slice(1,2):v(this,ct,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[Tt](v(this,z,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.lengthe.includes("package.json")?"package.json":void 0));d(i,void 0,v(this,ct,"f")),s=JSON.parse(v(this,ct,"f").readFileSync(i,"utf8"))}catch(t){}return v(this,ot,"f")[e]=s||{},v(this,ot,"f")[e]}[Et](t,e){(e=[].concat(e)).forEach((e=>{e=this[$t](e),v(this,et,"f")[t].push(e)}))}[At](t,e,s,i){this[St](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=s}))}[Pt](t,e,s,i){this[St](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=(v(this,et,"f")[t][e]||[]).concat(s)}))}[St](t,e,s,i,n){if(Array.isArray(s))s.forEach((e=>{t(e,i)}));else if((t=>"object"==typeof t)(s))for(const e of p(s))t(e,s[e]);else n(e,this[$t](s),i)}[$t](t){return"__proto__"===t?"___proto___":t}[It](t,e){return this[At](this[It].bind(this),"key",t,e),this}[Dt](){var t,e,s,i,n,r,o,a,h,l,c,f;const u=v(this,B,"f").pop();let p;d(u,void 0,v(this,ct,"f")),t=this,e=this,s=this,i=this,n=this,r=this,o=this,a=this,h=this,l=this,c=this,f=this,({options:{set value(e){O(t,et,e,"f")}}.value,configObjects:p,exitProcess:{set value(t){O(e,T,t,"f")}}.value,groups:{set value(t){O(s,Y,t,"f")}}.value,output:{set value(t){O(i,tt,t,"f")}}.value,exitError:{set value(t){O(n,V,t,"f")}}.value,hasOutput:{set value(t){O(r,J,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){O(o,ft,t,"f")}}.value,strictCommands:{set value(t){O(a,dt,t,"f")}}.value,strictOptions:{set value(t){O(h,ut,t,"f")}}.value,completionCommand:{set value(t){O(l,U,t,"f")}}.value,parseFn:{set value(t){O(c,nt,t,"f")}}.value,parseContext:{set value(t){O(f,rt,t,"f")}}.value}=u),v(this,et,"f").configObjects=p,v(this,pt,"f").unfreeze(),v(this,mt,"f").unfreeze(),v(this,W,"f").unfreeze(),v(this,K,"f").unfreeze()}[Nt](t,e){return j(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[Ht].bind(this),getContext:this[Wt].bind(this),getHasOutput:this[zt].bind(this),getLoggerInstance:this[qt].bind(this),getParseContext:this[Ft].bind(this),getParserConfiguration:this[jt].bind(this),getUsageInstance:this[Ut].bind(this),getValidationInstance:this[Lt].bind(this),hasParseCallback:this[Vt].bind(this),isGlobalContext:this[Gt].bind(this),postProcess:this[Rt].bind(this),reset:this[Bt].bind(this),runValidation:this[Yt].bind(this),runYargsParserAndExecuteCommands:this[Kt].bind(this),setHasOutput:this[Jt].bind(this)}}[Ht](){return v(this,W,"f")}[Wt](){return v(this,q,"f")}[zt](){return v(this,J,"f")}[qt](){return v(this,Q,"f")}[Ft](){return v(this,rt,"f")||{}}[Ut](){return v(this,pt,"f")}[Lt](){return v(this,mt,"f")}[Vt](){return!!v(this,nt,"f")}[Gt](){return v(this,X,"f")}[Rt](t,e,s,i){if(s)return t;if(f(t))return t;e||(t=this[yt](t));return(this[jt]()["parse-positional-numbers"]||void 0===this[jt]()["parse-positional-numbers"])&&(t=this[kt](t)),i&&(t=C(t,this,v(this,K,"f").getMiddleware(),!1)),t}[Bt](t={}){O(this,et,v(this,et,"f")||{},"f");const e={};e.local=v(this,et,"f").local||[],e.configObjects=v(this,et,"f").configObjects||[];const s={};e.local.forEach((e=>{s[e]=!0,(t[e]||[]).forEach((t=>{s[t]=!0}))})),Object.assign(v(this,at,"f"),Object.keys(v(this,Y,"f")).reduce(((t,e)=>{const i=v(this,Y,"f")[e].filter((t=>!(t in s)));return i.length>0&&(t[e]=i),t}),{})),O(this,Y,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(v(this,et,"f")[t]||[]).filter((t=>!s[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=g(v(this,et,"f")[t],(t=>!s[t]))})),e.envPrefix=v(this,et,"f").envPrefix,O(this,et,e,"f"),O(this,pt,v(this,pt,"f")?v(this,pt,"f").reset(s):P(this,v(this,ct,"f")),"f"),O(this,mt,v(this,mt,"f")?v(this,mt,"f").reset(s):function(t,e,s){const i=s.y18n.__,n=s.y18n.__n,r={nonOptionCount:function(s){const i=t.getDemandedCommands(),r=s._.length+(s["--"]?s["--"].length:0)-t.getInternalMethods().getContext().commands.length;i._&&(ri._.max)&&(ri._.max&&(void 0!==i._.maxMsg?e.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.max.toString()):null):e.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),i._.max.toString()))))},positionalCount:function(t,s){s{H.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,i)||f.push(e)})),h&&(d.commands.length>0||c.length>0||a)&&s._.slice(d.commands.length).forEach((t=>{c.includes(""+t)||f.push(""+t)})),h){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,i=d.commands.length+e;i{t=String(t),d.commands.includes(t)||f.includes(t)||f.push(t)}))}f.length&&e.fail(n("Unknown argument: %s","Unknown arguments: %s",f.length,f.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(s){const i=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&s._.slice(o.commands.length).forEach((t=>{i.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(n("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,s){if(!Object.prototype.hasOwnProperty.call(s,e))return!1;const i=t.parsed.newAliases;return[e,...s[e]].some((t=>!Object.prototype.hasOwnProperty.call(i,t)||!i[e]))},limitedChoices:function(s){const n=t.getOptions(),r={};if(!Object.keys(n.choices).length)return;Object.keys(s).forEach((t=>{-1===H.indexOf(t)&&Object.prototype.hasOwnProperty.call(n.choices,t)&&[].concat(s[t]).forEach((e=>{-1===n.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=i("Invalid values:");o.forEach((t=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(n.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const s=Number(e);return"number"==typeof(e=isNaN(s)?e:s)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,i){h(" [array|number|string]",[e,i],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(i)?i.forEach((t=>r.implies(e,t))):(d(i,void 0,s),o[e].push(i)))},r.getImplied=function(){return o},r.implications=function(t){const s=[];if(Object.keys(o).forEach((e=>{const i=e;(o[e]||[]).forEach((e=>{let n=i;const r=e;n=a(t,n),e=a(t,e),n&&!e&&s.push(` ${i} -> ${r}`)}))})),s.length){let t=`${i("Implications failed:")}\n`;s.forEach((e=>{t+=e})),e.fail(t)}};let l={};r.conflicts=function(e,s){h(" [array|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),l[e]||(l[e]=[]),Array.isArray(s)?s.forEach((t=>r.conflicts(e,t))):l[e].push(s))},r.getConflicting=()=>l,r.conflicting=function(n){Object.keys(n).forEach((t=>{l[t]&&l[t].forEach((s=>{s&&void 0!==n[t]&&void 0!==n[s]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,s))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach((t=>{l[t].forEach((r=>{r&&void 0!==n[s.Parser.camelCase(t)]&&void 0!==n[s.Parser.camelCase(r)]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,s){s=s.sort(((t,e)=>e.length-t.length));let n=null,r=1/0;for(let e,i=0;void 0!==(e=s[i]);i++){const s=N(t,e);s<=3&&s!t[e])),l=g(l,(e=>!t[e])),r};const c=[];return r.freeze=function(){c.push({implied:o,conflicting:l})},r.unfreeze=function(){const t=c.pop();d(t,void 0,s),({implied:o,conflicting:l}=t)},r}(this,v(this,pt,"f"),v(this,ct,"f")),"f"),O(this,W,v(this,W,"f")?v(this,W,"f").reset():function(t,e,s,i){return new M(t,e,s,i)}(v(this,pt,"f"),v(this,mt,"f"),v(this,K,"f"),v(this,ct,"f")),"f"),v(this,F,"f")||O(this,F,function(t,e,s,i){return new D(t,e,s,i)}(this,v(this,pt,"f"),v(this,W,"f"),v(this,ct,"f")),"f"),v(this,K,"f").reset(),O(this,U,null,"f"),O(this,tt,"","f"),O(this,V,null,"f"),O(this,J,!1,"f"),this.parsed=!1,this}[Tt](t,e){return v(this,ct,"f").path.relative(t,e)}[Kt](t,s,i,n=0,r=!1){let o=!!i||r;t=t||v(this,ht,"f"),v(this,et,"f").__=v(this,ct,"f").y18n.__,v(this,et,"f").configuration=this[jt]();const a=!!v(this,et,"f").configuration["populate--"],h=Object.assign({},v(this,et,"f").configuration,{"populate--":!0}),l=v(this,ct,"f").Parser.detailed(t,Object.assign({},v(this,et,"f"),{configuration:{"parse-positional-numbers":!1,...h}})),c=Object.assign(l.argv,v(this,rt,"f"));let d;const u=l.aliases;let p=!1,g=!1;Object.keys(c).forEach((t=>{t===v(this,Z,"f")&&c[t]?p=!0:t===v(this,gt,"f")&&c[t]&&(g=!0)})),c.$0=this.$0,this.parsed=l,0===n&&v(this,pt,"f").clearCachedHelpMessage();try{if(this[_t](),s)return this[Rt](c,a,!!i,!1);if(v(this,Z,"f")){[v(this,Z,"f")].concat(u[v(this,Z,"f")]||[]).filter((t=>t.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),p=!0)}O(this,X,!1,"f");const h=v(this,W,"f").getCommands(),m=v(this,F,"f").completionKey in c,y=p||m||r;if(c._.length){if(h.length){let t;for(let e,s=n||0;void 0!==c._[s];s++){if(e=String(c._[s]),h.includes(e)&&e!==v(this,U,"f")){const t=v(this,W,"f").runCommand(e,this,l,s+1,r,p||g||r);return this[Rt](t,a,!!i,!1)}if(!t&&e!==v(this,U,"f")){t=e;break}}!v(this,W,"f").hasDefaultCommand()&&v(this,lt,"f")&&t&&!y&&v(this,mt,"f").recommendCommands(t,h)}v(this,U,"f")&&c._.includes(v(this,U,"f"))&&!m&&(v(this,T,"f")&&E(!0),this.showCompletionScript(),this.exit(0))}if(v(this,W,"f").hasDefaultCommand()&&!y){const t=v(this,W,"f").runCommand(null,this,l,0,r,p||g||r);return this[Rt](t,a,!!i,!1)}if(m){v(this,T,"f")&&E(!0);const s=(t=[].concat(t)).slice(t.indexOf(`--${v(this,F,"f").completionKey}`)+1);return v(this,F,"f").getCompletion(s,((t,s)=>{if(t)throw new e(t.message);(s||[]).forEach((t=>{v(this,Q,"f").log(t)})),this.exit(0)})),this[Rt](c,!a,!!i,!1)}if(v(this,J,"f")||(p?(v(this,T,"f")&&E(!0),o=!0,this.showHelp("log"),this.exit(0)):g&&(v(this,T,"f")&&E(!0),o=!0,v(this,pt,"f").showVersion("log"),this.exit(0))),!o&&v(this,et,"f").skipValidation.length>0&&(o=Object.keys(c).some((t=>v(this,et,"f").skipValidation.indexOf(t)>=0&&!0===c[t]))),!o){if(l.error)throw new e(l.error.message);if(!m){const t=this[Yt](u,{},l.error);i||(d=C(c,this,v(this,K,"f").getMiddleware(),!0)),d=this[Nt](t,null!=d?d:c),f(d)&&!i&&(d=d.then((()=>C(c,this,v(this,K,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof e))throw t;v(this,pt,"f").fail(t.message,t)}return this[Rt](null!=d?d:c,a,!!i,!0)}[Yt](t,s,i,n){const r={...this.getDemandedOptions()};return o=>{if(i)throw new e(i.message);v(this,mt,"f").nonOptionCount(o),v(this,mt,"f").requiredArguments(o,r);let a=!1;v(this,dt,"f")&&(a=v(this,mt,"f").unknownCommands(o)),v(this,ft,"f")&&!a?v(this,mt,"f").unknownArguments(o,t,s,!!n):v(this,ut,"f")&&v(this,mt,"f").unknownArguments(o,t,{},!1,!1),v(this,mt,"f").limitedChoices(o),v(this,mt,"f").implications(o),v(this,mt,"f").conflicting(o)}}[Jt](){O(this,J,!0,"f")}[Zt](t){if("string"==typeof t)v(this,et,"f").key[t]=!0;else for(const e of t)v(this,et,"f").key[e]=!0}}var Qt,te;const{readFileSync:ee}=require("fs"),{inspect:se}=require("util"),{resolve:ie}=require("path"),ne=require("y18n"),re=require("yargs-parser");var oe,ae={assert:{notStrictEqual:t.notStrictEqual,strictEqual:t.strictEqual},cliui:require("cliui"),findUp:require("escalade/sync"),getEnv:t=>process.env[t],getCallerFile:require("get-caller-file"),getProcessArgvBin:y,inspect:se,mainFilename:null!==(te=null===(Qt=null===require||void 0===require?void 0:require.main)||void 0===Qt?void 0:Qt.filename)&&void 0!==te?te:process.cwd(),Parser:re,path:require("path"),process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:t=>{process.exit(t)},nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:ee,require:require,requireDirectory:require("require-directory"),stringWidth:require("string-width"),y18n:ne({directory:ie(__dirname,"../locales"),updateFiles:!1})};const he=(null===(oe=null===process||void 0===process?void 0:process.env)||void 0===oe?void 0:oe.YARGS_MIN_NODE_VERSION)?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1]){const i=new Xt(t,e,s,ce);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}),argsert:h,isPromise:f,objFilter:g,parseCommand:o,Parser:le,processArgv:b,YError:e};module.exports=fe; +"use strict";var t=require("assert");class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let s,i=[];function n(t,o,a,h){s=h;let l={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return l;const r=/\.json|\..*rc$/.test(t.extends);let h=null;if(r)h=function(t,e){return s.path.resolve(t,e)}(o,t.extends);else try{h=require.resolve(t.extends)}catch(e){return t}!function(t){if(i.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(h),i.push(h),l=r?JSON.parse(s.readFileSync(h,"utf8")):require(t.extends),delete t.extends,l=n(l,s.path.dirname(h),a,s)}return i=[],a?r(l,t):Object.assign({},l,t)}function r(t,e){const s={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(s,t);for(const n of Object.keys(e))i(e[n])&&i(s[n])?s[n]=r(t[n],e[n]):s[n]=e[n];return s}function o(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),s=/\.*[\][<>]/g,i=e.shift();if(!i)throw new Error(`No command found in: ${t}`);const n={cmd:i.replace(s,""),demanded:[],optional:[]};return e.forEach(((t,i)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&i===e.length-1&&(r=!0),/^\[/.test(t)?n.optional.push({cmd:t.replace(s,"").split("|"),variadic:r}):n.demanded.push({cmd:t.replace(s,"").split("|"),variadic:r})})),n}const a=["first","second","third","fourth","fifth","sixth"];function h(t,s,i){try{let n=0;const[r,a,h]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,i],f=[].slice.call(a);for(;f.length&&void 0===f[f.length-1];)f.pop();const d=h||f.length;if(du)throw new e(`Too many arguments provided. Expected max ${u} but received ${d}.`);r.demanded.forEach((t=>{const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1})),r.optional.forEach((t=>{if(0===f.length)return;const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,i){throw new e(`Invalid ${a[i]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,e,s,i){s.assert.notStrictEqual(t,e,i)}function u(t,e){e.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},e=(()=>!0)){const s={};return p(t).forEach((i=>{e(i,t[i])&&(s[i]=t[i])})),s}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var b=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function O(t,e,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,s):n?n.value=s:e.set(t,s),s}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,s=!0,i=!1){if(h(" [boolean] [boolean] [boolean]",[t,e,s],arguments.length),Array.isArray(t)){for(let i=0;i{const i=[...s[e]||[],e];return!t.option||!i.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,e,s,i){return s.reduce(((t,s)=>{if(s.applyBeforeValidation!==i)return t;if(s.mutates){if(s.applied)return t;s.applied=!0}if(f(t))return t.then((t=>Promise.all([t,s(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const i=s(t,e);return f(i)?i.then((e=>Object.assign(t,e))):Object.assign(t,i)}}),t)}function j(t,e,s=(t=>{throw t})){try{const s="function"==typeof t?t():t;return f(s)?s.then((t=>e(t))):e(s)}catch(t){return s(t)}}const M=/(^\*)|(^\$0)/;class _{constructor(t,e,s,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=s,this.validation=e}addDirectory(t,e,s,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:t=>t;i.visit=(t,e,s)=>{const i=n(t,e,s);if(i){if(this.requireCache.has(e))return i;this.requireCache.add(e),this.addHandler(i)}return i},this.shim.requireDirectory({require:e,filename:s},t,i)}addHandler(t,e,s,i,n,r){let a=[];const h=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(n);if(i=i||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...a]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(s))return void this.addHandler([t].concat(a),e,s.builder,s.handler,s.middlewares,s.deprecated)}if("string"==typeof t){const n=o(t);a=a.map((t=>o(t).cmd));let l=!1;const c=[n.cmd].concat(a).filter((t=>!M.test(t)||(l=!0,!1)));0===c.length&&l&&c.push("$0"),l&&(n.cmd=c[0],a=c.slice(1),t=t.replace(M,n.cmd)),a.forEach((t=>{this.aliasMap[t]=n.cmd})),!1!==e&&this.usage.command(t,e,l,a,r),this.handlers[n.cmd]={original:t,description:e,handler:i,builder:s||{},middlewares:h,deprecated:r,demanded:n.demanded,optional:n.optional},l&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,s,i,n,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),h=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,e,s.aliases,h,i,n,r);return f(c)?c.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,n,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,n,c.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,s,i,n,r,o,a){const h=e.builder;let l=s;if(x(h)){s.getInternalMethods().getUsageInstance().freeze();const c=h(s.getInternalMethods().reset(i),a);if(f(c))return c.then((i=>{var a;return l=(a=i)&&"function"==typeof a.getInternalMethods?i:s,this.parseAndUpdateUsage(t,e,l,n,r,o)}))}else(function(t){return"object"==typeof t})(h)&&(s.getInternalMethods().getUsageInstance().freeze(),l=s.getInternalMethods().reset(i),Object.keys(e.builder).forEach((t=>{l.option(t,h[t])})));return this.parseAndUpdateUsage(t,e,l,n,r,o)}parseAndUpdateUsage(t,e,s,i,n,r){t&&s.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(s)&&s.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,e),e.description);const o=s.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,r);return f(o)?o.then((t=>({aliases:s.parsed.aliases,innerArgv:t}))):{aliases:s.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const s=M.test(e.original)?e.original.replace(M,"").trim():e.original,i=t.filter((t=>!M.test(t)));return i.push(s),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,e,s,i,n,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(n,a,r.parsed.error,t);s=j(s,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const i=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(s,i,!1,!1),s=j(s=C(s,r,o,!1),(t=>{const s=e.handler(t);return f(s)?s.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(s)&&!r.getInternalMethods().hasParseCallback()&&s.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(i.commands.pop(),i.fullCommands.pop()),s}applyMiddlewareAndGetResult(t,e,s,i,n,r,o){let a={};if(n)return s;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,s,i,o));const h=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=C(s,o,h,!0);return f(l)?l.then((s=>this.handleValidationAndGetResult(t,e,s,i,r,o,h,a))):this.handleValidationAndGetResult(t,e,l,i,r,o,h,a)}populatePositionals(t,e,s,i){e._=e._.slice(s.commands.length);const n=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(n.length,e._.length);n.length;){const t=n.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=s.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),i),o}populatePositional(t,e,s){const i=t.cmd[0];t.variadic?s[i]=e._.splice(0).map(String):e._.length&&(s[i]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},s=o(t);return s.demanded.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i,e.demand[s]=!0})),s.optional.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i})),e}postProcessPositionals(t,e,s,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(s.default,n.default);for(const t of Object.keys(s.alias))n.alias[t]=(n.alias[t]||[]).concat(s.alias[t]);n.array=n.array.concat(s.array),n.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{n.configuration["unknown-options-as-args"]&&(n.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const s=Object.keys(e);Object.keys(e).forEach((t=>{s.push(...a.aliases[t])})),Object.keys(a.argv).forEach((n=>{s.includes(n)&&(e[n]||(e[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(t,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(t[n])||Array.isArray(a.argv[n]))?t[n]=[].concat(t[n],a.argv[n]):t[n]=a.argv[n])}))}}isDefaulted(t,e){const{default:s}=t.getOptions();return Object.prototype.hasOwnProperty.call(s,e)||Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:s}=t.getOptions();return s.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||s.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=M.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(x(e))return e(t,!0);k(e)||Object.keys(e).forEach((s=>{t.option(s,e[s])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,s=0,i=Object.keys(require.cache);s{const s=e;s._handle&&s.isTTY&&"function"==typeof s._handle.setBlocking&&s._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const i=s.y18n.__,n={},r=[];n.failFn=function(t){r.push(t)};let o=null,a=null,h=!0;n.showHelpOnFail=function(e=!0,s){const[i,r]="string"==typeof e?[!0,e]:[e,s];return t.getInternalMethods().isGlobalContext()&&(a=r),o=r,h=i,n};let l=!1;n.fail=function(s,i){const c=t.getInternalMethods().getLoggerInstance();if(!r.length){if(t.getExitProcess()&&E(!0),!l){l=!0,h&&(t.showHelp("error"),c.error()),(s||i)&&c.error(s||i);const e=o||a;e&&((s||i)&&c.error(""),c.error(e))}if(i=i||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,i);throw i}for(let t=r.length-1;t>=0;--t){const e=r[t];if(A(e)){if(i)throw i;if(s)throw Error(s)}else e(s,i,n)}};let c=[],f=!1;n.usage=(t,e)=>null===t?(f=!0,c=[],n):(f=!1,c.push([t,e||""]),n),n.getUsage=()=>c,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>i("Positionals:");let d=[];n.example=(t,e)=>{d.push([t,e||""])};let u=[];n.command=function(t,e,s,i,n=!1){s&&(u=u.map((t=>(t[2]=!1,t)))),u.push([t,e||"",s,i,n])},n.getCommands=()=>u;let p={};n.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{n.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{n.describe(e,t[e])})):p[t]=e},n.getDescriptions=()=>p;let m=[];n.epilog=t=>{m.push(t)};let y,b=!1;n.wrap=t=>{b=!0,y=t},n.getWrap=()=>s.getEnv("YARGS_DISABLE_WRAP")?null:(b||(y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),b=!0),y);const v="__yargsString__:";function O(t,e,i){let n=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{n=Math.max(s.stringWidth(i?`${i} ${I(t[0])}`:I(t[0]))+$(t[0]),n)})),e&&(n=Math.min(n,parseInt((.5*e).toString(),10))),n}let w;function C(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function j(t,e){let s=`[${i("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}n.deferY18nLookup=t=>v+t,n.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),s=t.getOptions();(Object.keys(s.alias)||[]).forEach((i=>{s.alias[i].forEach((r=>{p[r]&&n.describe(i,p[r]),r in e&&t.demandOption(i,e[r]),s.boolean.includes(r)&&t.boolean(i),s.count.includes(r)&&t.count(i),s.string.includes(r)&&t.string(i),s.normalize.includes(r)&&t.normalize(i),s.array.includes(r)&&t.array(i),s.number.includes(r)&&t.number(i)}))}))}();const e=t.customScriptName?t.$0:s.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),h=t.getGroups(),l=t.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(l.default)),g=g.filter(C),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const y=n.getWrap(),b=s.cliui({width:y,wrap:!!y});if(!f)if(c.length)c.forEach((t=>{b.div({text:`${t[0].replace(/\$0/g,e)}`}),t[1]&&b.div({text:`${t[1]}`,padding:[1,0,0,0]})})),b.div();else if(u.length){let t=null;t=o._?`${e} <${i("command")}>\n`:`${e} [${i("command")}]\n`,b.div(`${t}`)}if(u.length>1||1===u.length&&!u[0][2]){b.div(i("Commands:"));const s=t.getInternalMethods().getContext(),n=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(u=u.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=e?`${e} `:"";u.forEach((t=>{const s=`${r}${n}${t[0].replace(/^\$0 ?/,"")}`;b.span({text:s,padding:[0,2,0,2],width:O(u,y,`${e}${n}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${i("default")}]`),t[3]&&t[3].length&&o.push(`[${i("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${i("deprecated: %s",t[4])}]`):o.push(`[${i("deprecated")}]`)),o.length?b.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):b.div()})),b.div()}const M=(Object.keys(l.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&M.every((t=>-1===(l.alias[t]||[]).indexOf(e)))));const _=i("Options:");h[_]||(h[_]=[]),function(t,e,s,i){let n=[],r=null;Object.keys(s).forEach((t=>{n=n.concat(s[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==n.indexOf(t)))||s[i].push(t)}))}(g,l.alias,h,_);const k=t=>/^--/.test(I(t)),x=Object.keys(h).filter((t=>h[t].length>0)).map((t=>({groupName:t,normalizedKeys:h[t].filter(C).map((t=>{if(M.includes(t))return t;for(let e,s=0;void 0!==(e=M[s]);s++)if((l.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const s=e.reduce(((e,s)=>(e[s]=[s].concat(l.alias[s]||[]).map((e=>t===n.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?l.boolean.includes(s)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>k(t)===k(e)?0:k(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:s}}));if(x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>k(e[t])))))&&x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var s,i;k(e[t])&&(e[t]=(s=e[t],i="-x, ".length,S(s)?{text:s.text,indentation:s.indentation+i}:{text:s,indentation:i}))}))})),x.forEach((({groupName:e,normalizedKeys:s,switches:o})=>{b.div(e),s.forEach((e=>{const s=o[e];let h=p[e]||"",c=null;h.includes(v)&&(h=i(h.substring(v.length))),l.boolean.includes(e)&&(c=`[${i("boolean")}]`),l.count.includes(e)&&(c=`[${i("count")}]`),l.string.includes(e)&&(c=`[${i("string")}]`),l.normalize.includes(e)&&(c=`[${i("string")}]`),l.array.includes(e)&&(c=`[${i("array")}]`),l.number.includes(e)&&(c=`[${i("number")}]`);const f=[e in a?(d=a[e],"string"==typeof d?`[${i("deprecated: %s",d)}]`:`[${i("deprecated")}]`):null,c,e in r?`[${i("required")}]`:null,l.choices&&l.choices[e]?`[${i("choices:")} ${n.stringifiedValues(l.choices[e])}]`:null,j(l.default[e],l.defaultDescription[e])].filter(Boolean).join(" ");var d;b.span({text:I(s),padding:[0,2,0,2+$(s)],width:O(o,y)+4},h);const u=!0===t.getInternalMethods().getUsageConfiguration()["hide-types"];f&&!u?b.div({text:f,padding:[0,0,0,2],align:"right"}):b.div()})),b.div()})),d.length&&(b.div(i("Examples:")),d.forEach((t=>{t[0]=t[0].replace(/\$0/g,e)})),d.forEach((t=>{""===t[1]?b.div({text:t[0],padding:[0,2,0,2]}):b.div({text:t[0],padding:[0,2,0,2],width:O(d,y)+4},{text:t[1]})})),b.div()),m.length>0){const t=m.map((t=>t.replace(/\$0/g,e))).join("\n");b.div(`${t}\n`)}return b.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w},n.showHelp=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(n.help())},n.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):i("generated-value"),")"].join(""),n.stringifiedValues=function(t,e){let s="";const i=e||", ",n=[].concat(t);return t&&n.length?(n.forEach((t=>{s.length&&(s+=i),s+=JSON.stringify(t)})),s):s};let M=null;n.version=t=>{M=t},n.showVersion=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(M)},n.reset=function(t){return o=null,l=!1,c=[],f=!1,m=[],d=[],u=[],p=g(p,(e=>!t[e])),n};const _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p})},n.unfreeze=function(t=!1){const e=_.pop();e&&(t?(p={...e.descriptions,...p},u=[...e.commands,...u],c=[...e.usages,...c],d=[...e.examples,...d],m=[...e.epilogs,...m]):({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p}=e))},n}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,e,s,i){var n,r,o;this.yargs=t,this.usage=e,this.command=s,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,s,i){const n=this.command.getCommandHandlers();for(let e=0,s=t.length;e{const i=o(s[0]).cmd;if(-1===e.indexOf(i))if(this.zshShell){const e=s[1]||"";t.push(i.replace(/:/g,"\\:")+":"+e)}else t.push(i)}))}optionCompletions(t,e,s,i){if((i.match(/^-/)||""===i&&0===t.length)&&!this.previousArgHasChoices(e)){const s=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach((r=>{const o=!!s.configuration["boolean-negation"]&&s.boolean.includes(r);n.includes(r)||s.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||(this.completeOptionKey(r,t,i),o&&s.default[r]&&this.completeOptionKey(`no-${r}`,t,i))}))}}choicesFromOptionsCompletions(t,e,s,i){if(this.previousArgHasChoices(e)){const s=this.getPreviousArgChoices(e);s&&s.length>0&&t.push(...s.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,s,i){if(""===i&&t.length>0&&this.previousArgHasChoices(e))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[s._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(i)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],s="";if(!e.startsWith("-")&&t.length>1&&(s=e,e=t[t.length-2]),!e.startsWith("-"))return;const i=e.replace(/^-+/,""),n=this.yargs.getOptions(),r=[i,...this.yargs.getAliases()[i]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(n.key,t)&&Array.isArray(n.choices[t])){o=n.choices[t];break}return o?o.filter((t=>!s||t.startsWith(s))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,s){const i=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(i(e))return!0;if(s&&i(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(i(t))return!0;return!1}completeOptionKey(t,e,s){var i,n,r;const o=this.usage.getDescriptions(),a=!/^--/.test(s)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";if(this.zshShell){const s=null===(i=null==this?void 0:this.aliases)||void 0===i?void 0:i[t].find((t=>{const e=o[t];return"string"==typeof e&&e.length>0})),h=s?o[s]:void 0,l=null!==(r=null!==(n=o[t])&&void 0!==n?n:h)&&void 0!==r?r:"";e.push(a+`${t.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`)}else e.push(a+t)}customCompletion(t,e,s,i){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(s,e);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{i(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{i(t,void 0)}))})):i(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(s,e,((n=i)=>this.defaultCompletion(t,e,s,n)),(t=>{i(null,t)})):this.customCompletionFunction(s,e,(t=>{i(null,t)}))}getCompletion(t,e){const s=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),n=this.customCompletionFunction?i=>this.customCompletion(t,i,s,e):i=>this.defaultCompletion(t,i,s,e);return f(i)?i.then(n):n(i)}generateCompletionScript(t,e){let s=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),s=s.replace(/{{app_name}}/g,i),s=s.replace(/{{completion_command}}/g,e),s.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const s=[];let i,n;for(i=0;i<=e.length;i++)s[i]=[i];for(n=0;n<=t.length;n++)s[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?s[i][n]=s[i-1][n-1]:i>1&&n>1&&e.charAt(i-2)===t.charAt(n-1)&&e.charAt(i-1)===t.charAt(n-2)?s[i][n]=s[i-2][n-2]+1:s[i][n]=Math.min(s[i-1][n-1]+1,Math.min(s[i][n-1]+1,s[i-1][n]+1));return s[e.length][t.length]}const H=["$0","--","_"];var z,W,q,U,F,L,V,G,R,T,B,K,Y,J,Z,X,Q,tt,et,st,it,nt,rt,ot,at,ht,lt,ct,ft,dt,ut,pt,gt,mt,yt;const bt=Symbol("copyDoubleDash"),vt=Symbol("copyDoubleDash"),Ot=Symbol("deleteFromParserHintObject"),wt=Symbol("emitWarning"),Ct=Symbol("freeze"),jt=Symbol("getDollarZero"),Mt=Symbol("getParserConfiguration"),_t=Symbol("getUsageConfiguration"),kt=Symbol("guessLocale"),xt=Symbol("guessVersion"),Et=Symbol("parsePositionalNumbers"),At=Symbol("pkgUp"),Pt=Symbol("populateParserHintArray"),St=Symbol("populateParserHintSingleValueDictionary"),$t=Symbol("populateParserHintArrayDictionary"),It=Symbol("populateParserHintDictionary"),Dt=Symbol("sanitizeKey"),Nt=Symbol("setKey"),Ht=Symbol("unfreeze"),zt=Symbol("validateAsync"),Wt=Symbol("getCommandInstance"),qt=Symbol("getContext"),Ut=Symbol("getHasOutput"),Ft=Symbol("getLoggerInstance"),Lt=Symbol("getParseContext"),Vt=Symbol("getUsageInstance"),Gt=Symbol("getValidationInstance"),Rt=Symbol("hasParseCallback"),Tt=Symbol("isGlobalContext"),Bt=Symbol("postProcess"),Kt=Symbol("rebase"),Yt=Symbol("reset"),Jt=Symbol("runYargsParserAndExecuteCommands"),Zt=Symbol("runValidation"),Xt=Symbol("setHasOutput"),Qt=Symbol("kTrackManuallySetKeys");class te{constructor(t=[],e,s,i){this.customScriptName=!1,this.parsed=!1,z.set(this,void 0),W.set(this,void 0),q.set(this,{commands:[],fullCommands:[]}),U.set(this,null),F.set(this,null),L.set(this,"show-hidden"),V.set(this,null),G.set(this,!0),R.set(this,{}),T.set(this,!0),B.set(this,[]),K.set(this,void 0),Y.set(this,{}),J.set(this,!1),Z.set(this,null),X.set(this,!0),Q.set(this,void 0),tt.set(this,""),et.set(this,void 0),st.set(this,void 0),it.set(this,{}),nt.set(this,null),rt.set(this,null),ot.set(this,{}),at.set(this,{}),ht.set(this,void 0),lt.set(this,!1),ct.set(this,void 0),ft.set(this,!1),dt.set(this,!1),ut.set(this,!1),pt.set(this,void 0),gt.set(this,{}),mt.set(this,null),yt.set(this,void 0),O(this,ct,i,"f"),O(this,ht,t,"f"),O(this,W,e,"f"),O(this,st,s,"f"),O(this,K,new w(this),"f"),this.$0=this[jt](),this[Yt](),O(this,z,v(this,z,"f"),"f"),O(this,pt,v(this,pt,"f"),"f"),O(this,yt,v(this,yt,"f"),"f"),O(this,et,v(this,et,"f"),"f"),v(this,et,"f").showHiddenOpt=v(this,L,"f"),O(this,Q,this[vt](),"f")}addHelpOpt(t,e){return h("[string|boolean] [string]",[t,e],arguments.length),v(this,Z,"f")&&(this[Ot](v(this,Z,"f")),O(this,Z,null,"f")),!1===t&&void 0===e||(O(this,Z,"string"==typeof t?t:"help","f"),this.boolean(v(this,Z,"f")),this.describe(v(this,Z,"f"),e||v(this,pt,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(h("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const s="string"==typeof t?t:v(this,L,"f");return this.boolean(s),this.describe(s,e||v(this,pt,"f").deferY18nLookup("Show hidden options")),v(this,et,"f").showHiddenOpt=s,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return h(" [string|array]",[t,e],arguments.length),this[$t](this.alias.bind(this),"alias",t,e),this}array(t){return h("",[t],arguments.length),this[Pt]("array",t),this[Qt](t),this}boolean(t){return h("",[t],arguments.length),this[Pt]("boolean",t),this[Qt](t),this}check(t,e){return h(" [boolean]",[t,e],arguments.length),this.middleware(((e,s)=>j((()=>t(e,s.getOptions())),(s=>(s?("string"==typeof s||s instanceof Error)&&v(this,pt,"f").fail(s.toString(),s):v(this,pt,"f").fail(v(this,ct,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(v(this,pt,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return h(" [string|array]",[t,e],arguments.length),this[$t](this.choices.bind(this),"choices",t,e),this}coerce(t,s){if(h(" [function]",[t,s],arguments.length),Array.isArray(t)){if(!s)throw new e("coerce callback must be provided");for(const e of t)this.coerce(e,s);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!s)throw new e("coerce callback must be provided");return v(this,et,"f").key[t]=!0,v(this,K,"f").addCoerceMiddleware(((i,n)=>{let r;return Object.prototype.hasOwnProperty.call(i,t)?j((()=>(r=n.getAliases(),s(i[t]))),(e=>{i[t]=e;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(r[t]&&!0!==s)for(const s of r[t])i[s]=e;return i}),(t=>{throw new e(t.message)})):i}),t),this}conflicts(t,e){return h(" [string|array]",[t,e],arguments.length),v(this,yt,"f").conflicts(t,e),this}config(t="config",e,s){return h("[object|string] [string|function] [function]",[t,e,s],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(s=e,e=void 0),this.describe(t,e||v(this,pt,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{v(this,et,"f").config[t]=s||!0})),this):(t=n(t,v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(t),this)}completion(t,e,s){return h("[string] [string|boolean|function] [function]",[t,e,s],arguments.length),"function"==typeof e&&(s=e,e=void 0),O(this,F,t||v(this,F,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(v(this,F,"f"),e),s&&v(this,U,"f").registerFunction(s),this}command(t,e,s,i,n,r){return h(" [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,s,i,n,r],arguments.length),v(this,z,"f").addHandler(t,e,s,i,n,r),this}commands(t,e,s,i,n,r){return this.command(t,e,s,i,n,r)}commandDir(t,e){h(" [object]",[t,e],arguments.length);const s=v(this,st,"f")||v(this,ct,"f").require;return v(this,z,"f").addDirectory(t,s,v(this,ct,"f").getCallerFile(),e),this}count(t){return h("",[t],arguments.length),this[Pt]("count",t),this[Qt](t),this}default(t,e,s){return h(" [*] [string]",[t,e,s],arguments.length),s&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]=s),"function"==typeof e&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]||(v(this,et,"f").defaultDescription[t]=v(this,pt,"f").functionDescription(e)),e=e.call()),this[St](this.default.bind(this),"default",t,e),this}defaults(t,e,s){return this.default(t,e,s)}demandCommand(t=1,e,s,i){return h("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,s,i],arguments.length),"number"!=typeof e&&(s=e,e=1/0),this.global("_",!1),v(this,et,"f").demandedCommands._={min:t,max:e,minMsg:s,maxMsg:i},this}demand(t,e,s){return Array.isArray(e)?(e.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})),e=1/0):"number"!=typeof e&&(s=e,e=1/0),"number"==typeof t?(d(s,!0,v(this,ct,"f")),this.demandCommand(t,e,s,s)):Array.isArray(t)?t.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})):"string"==typeof s?this.demandOption(t,s):!0!==s&&void 0!==s||this.demandOption(t),this}demandOption(t,e){return h(" [string]",[t,e],arguments.length),this[St](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return h(" [string|boolean]",[t,e],arguments.length),v(this,et,"f").deprecatedOptions[t]=e,this}describe(t,e){return h(" [string]",[t,e],arguments.length),this[Nt](t,!0),v(this,pt,"f").describe(t,e),this}detectLocale(t){return h("",[t],arguments.length),O(this,G,t,"f"),this}env(t){return h("[string|boolean]",[t],arguments.length),!1===t?delete v(this,et,"f").envPrefix:v(this,et,"f").envPrefix=t||"",this}epilogue(t){return h("",[t],arguments.length),v(this,pt,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return h(" [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):v(this,pt,"f").example(t,e),this}exit(t,e){O(this,J,!0,"f"),O(this,V,e,"f"),v(this,T,"f")&&v(this,ct,"f").process.exit(t)}exitProcess(t=!0){return h("[boolean]",[t],arguments.length),O(this,T,t,"f"),this}fail(t){if(h("",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new e("Invalid first argument. Expected function or boolean 'false'");return v(this,pt,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return h(" [function]",[t,e],arguments.length),e?v(this,U,"f").getCompletion(t,e):new Promise(((e,s)=>{v(this,U,"f").getCompletion(t,((t,i)=>{t?s(t):e(i)}))}))}getDemandedOptions(){return h([],0),v(this,et,"f").demandedOptions}getDemandedCommands(){return h([],0),v(this,et,"f").demandedCommands}getDeprecatedOptions(){return h([],0),v(this,et,"f").deprecatedOptions}getDetectLocale(){return v(this,G,"f")}getExitProcess(){return v(this,T,"f")}getGroups(){return Object.assign({},v(this,Y,"f"),v(this,at,"f"))}getHelp(){if(O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(t))return t.then((()=>v(this,pt,"f").help()))}const t=v(this,z,"f").runDefaultBuilderOn(this);if(f(t))return t.then((()=>v(this,pt,"f").help()))}return Promise.resolve(v(this,pt,"f").help())}getOptions(){return v(this,et,"f")}getStrict(){return v(this,ft,"f")}getStrictCommands(){return v(this,dt,"f")}getStrictOptions(){return v(this,ut,"f")}global(t,e){return h(" [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?v(this,et,"f").local=v(this,et,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{v(this,et,"f").local.includes(t)||v(this,et,"f").local.push(t)})),this}group(t,e){h(" ",[t,e],arguments.length);const s=v(this,at,"f")[e]||v(this,Y,"f")[e];v(this,at,"f")[e]&&delete v(this,at,"f")[e];const i={};return v(this,Y,"f")[e]=(s||[]).concat(t).filter((t=>!i[t]&&(i[t]=!0))),this}hide(t){return h("",[t],arguments.length),v(this,et,"f").hiddenOptions.push(t),this}implies(t,e){return h(" [number|string|array]",[t,e],arguments.length),v(this,yt,"f").implies(t,e),this}locale(t){return h("[string]",[t],arguments.length),void 0===t?(this[kt](),v(this,ct,"f").y18n.getLocale()):(O(this,G,!1,"f"),v(this,ct,"f").y18n.setLocale(t),this)}middleware(t,e,s){return v(this,K,"f").addMiddleware(t,!!e,s)}nargs(t,e){return h(" [number]",[t,e],arguments.length),this[St](this.nargs.bind(this),"narg",t,e),this}normalize(t){return h("",[t],arguments.length),this[Pt]("normalize",t),this}number(t){return h("",[t],arguments.length),this[Pt]("number",t),this[Qt](t),this}option(t,e){if(h(" [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Qt](t),!v(this,mt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[wt](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),v(this,et,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const s=e.deprecate||e.deprecated;s&&this.deprecateOption(t,s);const i=e.demand||e.required||e.require;i&&this.demand(t,i),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(v(this,et,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const n=e.describe||e.description||e.desc,r=v(this,pt,"f").getDescriptions();Object.prototype.hasOwnProperty.call(r,t)&&"string"!=typeof n||this.describe(t,n),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,s){h("[string|array] [function|boolean|object] [function]",[t,e,s],arguments.length),this[Ct](),void 0===t&&(t=v(this,ht,"f")),"object"==typeof e&&(O(this,rt,e,"f"),e=s),"function"==typeof e&&(O(this,nt,e,"f"),e=!1),e||O(this,ht,t,"f"),v(this,nt,"f")&&O(this,T,!1,"f");const i=this[Jt](t,!!e),n=this.parsed;return v(this,U,"f").setParsed(this.parsed),f(i)?i.then((t=>(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),t,v(this,tt,"f")),t))).catch((t=>{throw v(this,nt,"f")&&v(this,nt,"f")(t,this.parsed.argv,v(this,tt,"f")),t})).finally((()=>{this[Ht](),this.parsed=n})):(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),i,v(this,tt,"f")),this[Ht](),this.parsed=n,i)}parseAsync(t,e,s){const i=this.parse(t,e,s);return f(i)?i:Promise.resolve(i)}parseSync(t,s,i){const n=this.parse(t,s,i);if(f(n))throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return h("",[t],arguments.length),O(this,it,t,"f"),this}pkgConf(t,e){h(" [string]",[t,e],arguments.length);let s=null;const i=this[At](e||v(this,W,"f"));return i[t]&&"object"==typeof i[t]&&(s=n(i[t],e||v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(s)),this}positional(t,e){h(" ",[t,e],arguments.length);const s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=g(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&s.includes(t)));const i=v(this,q,"f").fullCommands[v(this,q,"f").fullCommands.length-1],n=i?v(this,z,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return p(n).forEach((s=>{const i=n[s];Array.isArray(i)?-1!==i.indexOf(t)&&(e[s]=!0):i[t]&&!(s in e)&&(e[s]=i[t])})),this.group(t,v(this,pt,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return h("[boolean]",[t],arguments.length),O(this,lt,t,"f"),this}required(t,e,s){return this.demand(t,e,s)}require(t,e,s){return this.demand(t,e,s)}requiresArg(t){return h(" [number]",[t],arguments.length),"string"==typeof t&&v(this,et,"f").narg[t]||this[St](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return h("[string] [string]",[t,e],arguments.length),t=t||this.$0,v(this,Q,"f").log(v(this,U,"f").generateCompletionScript(t,e||v(this,F,"f")||"completion")),this}showHelp(t){if(h("[string|function]",[t],arguments.length),O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}const e=v(this,z,"f").runDefaultBuilderOn(this);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}return v(this,pt,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return h("[boolean|string] [string]",[t,e],arguments.length),v(this,pt,"f").showHelpOnFail(t,e),this}showVersion(t){return h("[string|function]",[t],arguments.length),v(this,pt,"f").showVersion(t),this}skipValidation(t){return h("",[t],arguments.length),this[Pt]("skipValidation",t),this}strict(t){return h("[boolean]",[t],arguments.length),O(this,ft,!1!==t,"f"),this}strictCommands(t){return h("[boolean]",[t],arguments.length),O(this,dt,!1!==t,"f"),this}strictOptions(t){return h("[boolean]",[t],arguments.length),O(this,ut,!1!==t,"f"),this}string(t){return h("",[t],arguments.length),this[Pt]("string",t),this[Qt](t),this}terminalWidth(){return h([],0),v(this,ct,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return h("",[t],arguments.length),O(this,G,!1,"f"),v(this,ct,"f").y18n.updateLocale(t),this}usage(t,s,i,n){if(h(" [string|boolean] [function|object] [function]",[t,s,i,n],arguments.length),void 0!==s){if(d(t,null,v(this,ct,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,s,i,n);throw new e(".usage() description must start with $0 if being used as alias for .command()")}return v(this,pt,"f").usage(t),this}usageConfiguration(t){return h("",[t],arguments.length),O(this,gt,t,"f"),this}version(t,e,s){const i="version";if(h("[boolean|string] [string] [string]",[t,e,s],arguments.length),v(this,mt,"f")&&(this[Ot](v(this,mt,"f")),v(this,pt,"f").version(void 0),O(this,mt,null,"f")),0===arguments.length)s=this[xt](),t=i;else if(1===arguments.length){if(!1===t)return this;s=t,t=i}else 2===arguments.length&&(s=e,e=void 0);return O(this,mt,"string"==typeof t?t:i,"f"),e=e||v(this,pt,"f").deferY18nLookup("Show version number"),v(this,pt,"f").version(s||void 0),this.boolean(v(this,mt,"f")),this.describe(v(this,mt,"f"),e),this}wrap(t){return h("",[t],arguments.length),v(this,pt,"f").wrap(t),this}[(z=new WeakMap,W=new WeakMap,q=new WeakMap,U=new WeakMap,F=new WeakMap,L=new WeakMap,V=new WeakMap,G=new WeakMap,R=new WeakMap,T=new WeakMap,B=new WeakMap,K=new WeakMap,Y=new WeakMap,J=new WeakMap,Z=new WeakMap,X=new WeakMap,Q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,ht=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=new WeakMap,bt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[vt](){return{log:(...t)=>{this[Rt]()||console.log(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")},error:(...t)=>{this[Rt]()||console.error(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")}}}[Ot](t){p(v(this,et,"f")).forEach((e=>{if("configObjects"===e)return;const s=v(this,et,"f")[e];Array.isArray(s)?s.includes(t)&&s.splice(s.indexOf(t),1):"object"==typeof s&&delete s[t]})),delete v(this,pt,"f").getDescriptions()[t]}[wt](t,e,s){v(this,R,"f")[s]||(v(this,ct,"f").process.emitWarning(t,e),v(this,R,"f")[s]=!0)}[Ct](){v(this,B,"f").push({options:v(this,et,"f"),configObjects:v(this,et,"f").configObjects.slice(0),exitProcess:v(this,T,"f"),groups:v(this,Y,"f"),strict:v(this,ft,"f"),strictCommands:v(this,dt,"f"),strictOptions:v(this,ut,"f"),completionCommand:v(this,F,"f"),output:v(this,tt,"f"),exitError:v(this,V,"f"),hasOutput:v(this,J,"f"),parsed:this.parsed,parseFn:v(this,nt,"f"),parseContext:v(this,rt,"f")}),v(this,pt,"f").freeze(),v(this,yt,"f").freeze(),v(this,z,"f").freeze(),v(this,K,"f").freeze()}[jt](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(v(this,ct,"f").process.argv()[0])?v(this,ct,"f").process.argv().slice(1,2):v(this,ct,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[Kt](v(this,W,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.lengthe.includes("package.json")?"package.json":void 0));d(i,void 0,v(this,ct,"f")),s=JSON.parse(v(this,ct,"f").readFileSync(i,"utf8"))}catch(t){}return v(this,ot,"f")[e]=s||{},v(this,ot,"f")[e]}[Pt](t,e){(e=[].concat(e)).forEach((e=>{e=this[Dt](e),v(this,et,"f")[t].push(e)}))}[St](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=s}))}[$t](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=(v(this,et,"f")[t][e]||[]).concat(s)}))}[It](t,e,s,i,n){if(Array.isArray(s))s.forEach((e=>{t(e,i)}));else if((t=>"object"==typeof t)(s))for(const e of p(s))t(e,s[e]);else n(e,this[Dt](s),i)}[Dt](t){return"__proto__"===t?"___proto___":t}[Nt](t,e){return this[St](this[Nt].bind(this),"key",t,e),this}[Ht](){var t,e,s,i,n,r,o,a,h,l,c,f;const u=v(this,B,"f").pop();let p;d(u,void 0,v(this,ct,"f")),t=this,e=this,s=this,i=this,n=this,r=this,o=this,a=this,h=this,l=this,c=this,f=this,({options:{set value(e){O(t,et,e,"f")}}.value,configObjects:p,exitProcess:{set value(t){O(e,T,t,"f")}}.value,groups:{set value(t){O(s,Y,t,"f")}}.value,output:{set value(t){O(i,tt,t,"f")}}.value,exitError:{set value(t){O(n,V,t,"f")}}.value,hasOutput:{set value(t){O(r,J,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){O(o,ft,t,"f")}}.value,strictCommands:{set value(t){O(a,dt,t,"f")}}.value,strictOptions:{set value(t){O(h,ut,t,"f")}}.value,completionCommand:{set value(t){O(l,F,t,"f")}}.value,parseFn:{set value(t){O(c,nt,t,"f")}}.value,parseContext:{set value(t){O(f,rt,t,"f")}}.value}=u),v(this,et,"f").configObjects=p,v(this,pt,"f").unfreeze(),v(this,yt,"f").unfreeze(),v(this,z,"f").unfreeze(),v(this,K,"f").unfreeze()}[zt](t,e){return j(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[Wt].bind(this),getContext:this[qt].bind(this),getHasOutput:this[Ut].bind(this),getLoggerInstance:this[Ft].bind(this),getParseContext:this[Lt].bind(this),getParserConfiguration:this[Mt].bind(this),getUsageConfiguration:this[_t].bind(this),getUsageInstance:this[Vt].bind(this),getValidationInstance:this[Gt].bind(this),hasParseCallback:this[Rt].bind(this),isGlobalContext:this[Tt].bind(this),postProcess:this[Bt].bind(this),reset:this[Yt].bind(this),runValidation:this[Zt].bind(this),runYargsParserAndExecuteCommands:this[Jt].bind(this),setHasOutput:this[Xt].bind(this)}}[Wt](){return v(this,z,"f")}[qt](){return v(this,q,"f")}[Ut](){return v(this,J,"f")}[Ft](){return v(this,Q,"f")}[Lt](){return v(this,rt,"f")||{}}[Vt](){return v(this,pt,"f")}[Gt](){return v(this,yt,"f")}[Rt](){return!!v(this,nt,"f")}[Tt](){return v(this,X,"f")}[Bt](t,e,s,i){if(s)return t;if(f(t))return t;e||(t=this[bt](t));return(this[Mt]()["parse-positional-numbers"]||void 0===this[Mt]()["parse-positional-numbers"])&&(t=this[Et](t)),i&&(t=C(t,this,v(this,K,"f").getMiddleware(),!1)),t}[Yt](t={}){O(this,et,v(this,et,"f")||{},"f");const e={};e.local=v(this,et,"f").local||[],e.configObjects=v(this,et,"f").configObjects||[];const s={};e.local.forEach((e=>{s[e]=!0,(t[e]||[]).forEach((t=>{s[t]=!0}))})),Object.assign(v(this,at,"f"),Object.keys(v(this,Y,"f")).reduce(((t,e)=>{const i=v(this,Y,"f")[e].filter((t=>!(t in s)));return i.length>0&&(t[e]=i),t}),{})),O(this,Y,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(v(this,et,"f")[t]||[]).filter((t=>!s[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=g(v(this,et,"f")[t],(t=>!s[t]))})),e.envPrefix=v(this,et,"f").envPrefix,O(this,et,e,"f"),O(this,pt,v(this,pt,"f")?v(this,pt,"f").reset(s):P(this,v(this,ct,"f")),"f"),O(this,yt,v(this,yt,"f")?v(this,yt,"f").reset(s):function(t,e,s){const i=s.y18n.__,n=s.y18n.__n,r={nonOptionCount:function(s){const i=t.getDemandedCommands(),r=s._.length+(s["--"]?s["--"].length:0)-t.getInternalMethods().getContext().commands.length;i._&&(ri._.max)&&(ri._.max&&(void 0!==i._.maxMsg?e.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.max.toString()):null):e.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),i._.max.toString()))))},positionalCount:function(t,s){s{H.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,i)||f.push(e)})),h&&(d.commands.length>0||c.length>0||a)&&s._.slice(d.commands.length).forEach((t=>{c.includes(""+t)||f.push(""+t)})),h){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,i=d.commands.length+e;i{t=String(t),d.commands.includes(t)||f.includes(t)||f.push(t)}))}f.length&&e.fail(n("Unknown argument: %s","Unknown arguments: %s",f.length,f.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(s){const i=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&s._.slice(o.commands.length).forEach((t=>{i.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(n("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,s){if(!Object.prototype.hasOwnProperty.call(s,e))return!1;const i=t.parsed.newAliases;return[e,...s[e]].some((t=>!Object.prototype.hasOwnProperty.call(i,t)||!i[e]))},limitedChoices:function(s){const n=t.getOptions(),r={};if(!Object.keys(n.choices).length)return;Object.keys(s).forEach((t=>{-1===H.indexOf(t)&&Object.prototype.hasOwnProperty.call(n.choices,t)&&[].concat(s[t]).forEach((e=>{-1===n.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=i("Invalid values:");o.forEach((t=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(n.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const s=Number(e);return"number"==typeof(e=isNaN(s)?e:s)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,i){h(" [array|number|string]",[e,i],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(i)?i.forEach((t=>r.implies(e,t))):(d(i,void 0,s),o[e].push(i)))},r.getImplied=function(){return o},r.implications=function(t){const s=[];if(Object.keys(o).forEach((e=>{const i=e;(o[e]||[]).forEach((e=>{let n=i;const r=e;n=a(t,n),e=a(t,e),n&&!e&&s.push(` ${i} -> ${r}`)}))})),s.length){let t=`${i("Implications failed:")}\n`;s.forEach((e=>{t+=e})),e.fail(t)}};let l={};r.conflicts=function(e,s){h(" [array|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),l[e]||(l[e]=[]),Array.isArray(s)?s.forEach((t=>r.conflicts(e,t))):l[e].push(s))},r.getConflicting=()=>l,r.conflicting=function(n){Object.keys(n).forEach((t=>{l[t]&&l[t].forEach((s=>{s&&void 0!==n[t]&&void 0!==n[s]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,s))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach((t=>{l[t].forEach((r=>{r&&void 0!==n[s.Parser.camelCase(t)]&&void 0!==n[s.Parser.camelCase(r)]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,s){s=s.sort(((t,e)=>e.length-t.length));let n=null,r=1/0;for(let e,i=0;void 0!==(e=s[i]);i++){const s=N(t,e);s<=3&&s!t[e])),l=g(l,(e=>!t[e])),r};const c=[];return r.freeze=function(){c.push({implied:o,conflicting:l})},r.unfreeze=function(){const t=c.pop();d(t,void 0,s),({implied:o,conflicting:l}=t)},r}(this,v(this,pt,"f"),v(this,ct,"f")),"f"),O(this,z,v(this,z,"f")?v(this,z,"f").reset():function(t,e,s,i){return new _(t,e,s,i)}(v(this,pt,"f"),v(this,yt,"f"),v(this,K,"f"),v(this,ct,"f")),"f"),v(this,U,"f")||O(this,U,function(t,e,s,i){return new D(t,e,s,i)}(this,v(this,pt,"f"),v(this,z,"f"),v(this,ct,"f")),"f"),v(this,K,"f").reset(),O(this,F,null,"f"),O(this,tt,"","f"),O(this,V,null,"f"),O(this,J,!1,"f"),this.parsed=!1,this}[Kt](t,e){return v(this,ct,"f").path.relative(t,e)}[Jt](t,s,i,n=0,r=!1){let o=!!i||r;t=t||v(this,ht,"f"),v(this,et,"f").__=v(this,ct,"f").y18n.__,v(this,et,"f").configuration=this[Mt]();const a=!!v(this,et,"f").configuration["populate--"],h=Object.assign({},v(this,et,"f").configuration,{"populate--":!0}),l=v(this,ct,"f").Parser.detailed(t,Object.assign({},v(this,et,"f"),{configuration:{"parse-positional-numbers":!1,...h}})),c=Object.assign(l.argv,v(this,rt,"f"));let d;const u=l.aliases;let p=!1,g=!1;Object.keys(c).forEach((t=>{t===v(this,Z,"f")&&c[t]?p=!0:t===v(this,mt,"f")&&c[t]&&(g=!0)})),c.$0=this.$0,this.parsed=l,0===n&&v(this,pt,"f").clearCachedHelpMessage();try{if(this[kt](),s)return this[Bt](c,a,!!i,!1);if(v(this,Z,"f")){[v(this,Z,"f")].concat(u[v(this,Z,"f")]||[]).filter((t=>t.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),p=!0)}O(this,X,!1,"f");const h=v(this,z,"f").getCommands(),m=v(this,U,"f").completionKey in c,y=p||m||r;if(c._.length){if(h.length){let t;for(let e,s=n||0;void 0!==c._[s];s++){if(e=String(c._[s]),h.includes(e)&&e!==v(this,F,"f")){const t=v(this,z,"f").runCommand(e,this,l,s+1,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(!t&&e!==v(this,F,"f")){t=e;break}}!v(this,z,"f").hasDefaultCommand()&&v(this,lt,"f")&&t&&!y&&v(this,yt,"f").recommendCommands(t,h)}v(this,F,"f")&&c._.includes(v(this,F,"f"))&&!m&&(v(this,T,"f")&&E(!0),this.showCompletionScript(),this.exit(0))}if(v(this,z,"f").hasDefaultCommand()&&!y){const t=v(this,z,"f").runCommand(null,this,l,0,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(m){v(this,T,"f")&&E(!0);const s=(t=[].concat(t)).slice(t.indexOf(`--${v(this,U,"f").completionKey}`)+1);return v(this,U,"f").getCompletion(s,((t,s)=>{if(t)throw new e(t.message);(s||[]).forEach((t=>{v(this,Q,"f").log(t)})),this.exit(0)})),this[Bt](c,!a,!!i,!1)}if(v(this,J,"f")||(p?(v(this,T,"f")&&E(!0),o=!0,this.showHelp("log"),this.exit(0)):g&&(v(this,T,"f")&&E(!0),o=!0,v(this,pt,"f").showVersion("log"),this.exit(0))),!o&&v(this,et,"f").skipValidation.length>0&&(o=Object.keys(c).some((t=>v(this,et,"f").skipValidation.indexOf(t)>=0&&!0===c[t]))),!o){if(l.error)throw new e(l.error.message);if(!m){const t=this[Zt](u,{},l.error);i||(d=C(c,this,v(this,K,"f").getMiddleware(),!0)),d=this[zt](t,null!=d?d:c),f(d)&&!i&&(d=d.then((()=>C(c,this,v(this,K,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof e))throw t;v(this,pt,"f").fail(t.message,t)}return this[Bt](null!=d?d:c,a,!!i,!0)}[Zt](t,s,i,n){const r={...this.getDemandedOptions()};return o=>{if(i)throw new e(i.message);v(this,yt,"f").nonOptionCount(o),v(this,yt,"f").requiredArguments(o,r);let a=!1;v(this,dt,"f")&&(a=v(this,yt,"f").unknownCommands(o)),v(this,ft,"f")&&!a?v(this,yt,"f").unknownArguments(o,t,s,!!n):v(this,ut,"f")&&v(this,yt,"f").unknownArguments(o,t,{},!1,!1),v(this,yt,"f").limitedChoices(o),v(this,yt,"f").implications(o),v(this,yt,"f").conflicting(o)}}[Xt](){O(this,J,!0,"f")}[Qt](t){if("string"==typeof t)v(this,et,"f").key[t]=!0;else for(const e of t)v(this,et,"f").key[e]=!0}}var ee,se;const{readFileSync:ie}=require("fs"),{inspect:ne}=require("util"),{resolve:re}=require("path"),oe=require("y18n"),ae=require("yargs-parser");var he,le={assert:{notStrictEqual:t.notStrictEqual,strictEqual:t.strictEqual},cliui:require("cliui"),findUp:require("escalade/sync"),getEnv:t=>process.env[t],getCallerFile:require("get-caller-file"),getProcessArgvBin:y,inspect:ne,mainFilename:null!==(se=null===(ee=null===require||void 0===require?void 0:require.main)||void 0===ee?void 0:ee.filename)&&void 0!==se?se:process.cwd(),Parser:ae,path:require("path"),process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:t=>{process.exit(t)},nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:ie,require:require,requireDirectory:require("require-directory"),stringWidth:require("string-width"),y18n:oe({directory:re(__dirname,"../locales"),updateFiles:!1})};const ce=(null===(he=null===process||void 0===process?void 0:process.env)||void 0===he?void 0:he.YARGS_MIN_NODE_VERSION)?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1]){const i=new te(t,e,s,de);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}),argsert:h,isPromise:f,objFilter:g,parseCommand:o,Parser:fe,processArgv:b,YError:e};module.exports=ue; diff --git a/node_modules/yargs/build/lib/command.js b/node_modules/yargs/build/lib/command.js index 89b150c37..47c1ed635 100644 --- a/node_modules/yargs/build/lib/command.js +++ b/node_modules/yargs/build/lib/command.js @@ -131,6 +131,7 @@ export class CommandInstance { const builder = commandHandler.builder; let innerYargs = yargs; if (isCommandBuilderCallback(builder)) { + yargs.getInternalMethods().getUsageInstance().freeze(); const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet); if (isPromise(builderOutput)) { return builderOutput.then(output => { @@ -140,6 +141,7 @@ export class CommandInstance { } } else if (isCommandBuilderOptionDefinitions(builder)) { + yargs.getInternalMethods().getUsageInstance().freeze(); innerYargs = yargs.getInternalMethods().reset(aliases); Object.keys(commandHandler.builder).forEach(key => { innerYargs.option(key, builder[key]); diff --git a/node_modules/yargs/build/lib/completion.js b/node_modules/yargs/build/lib/completion.js index 1c592127f..9b2b15317 100644 --- a/node_modules/yargs/build/lib/completion.js +++ b/node_modules/yargs/build/lib/completion.js @@ -154,6 +154,7 @@ export class Completion { return false; } completeOptionKey(key, completions, current) { + var _a, _b, _c; const descs = this.usage.getDescriptions(); const startsByTwoDashes = (s) => /^--/.test(s); const isShortOption = (s) => /^[^0-9]$/.test(s); @@ -162,9 +163,16 @@ export class Completion { completions.push(dashes + key); } else { - const desc = descs[key] || ''; + const aliasKey = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key].find(alias => { + const desc = descs[alias]; + return typeof desc === 'string' && desc.length > 0; + }); + const descFromAlias = aliasKey ? descs[aliasKey] : undefined; + const desc = (_c = (_b = descs[key]) !== null && _b !== void 0 ? _b : descFromAlias) !== null && _c !== void 0 ? _c : ''; completions.push(dashes + - `${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`); + `${key.replace(/:/g, '\\:')}:${desc + .replace('__yargsString__:', '') + .replace(/(\r\n|\n|\r)/gm, ' ')}`); } } customCompletion(args, argv, current, done) { diff --git a/node_modules/yargs/build/lib/usage.js b/node_modules/yargs/build/lib/usage.js index 2e1407379..0127c130d 100644 --- a/node_modules/yargs/build/lib/usage.js +++ b/node_modules/yargs/build/lib/usage.js @@ -346,7 +346,9 @@ export function usage(yargs, shim) { padding: [0, 2, 0, 2 + getIndentation(kswitch)], width: maxWidth(switches, theWrap) + 4, }, desc); - if (extra) + const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] === + true; + if (extra && !shouldHideOptionExtras) ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); else ui.div(); diff --git a/node_modules/yargs/build/lib/yargs-factory.js b/node_modules/yargs/build/lib/yargs-factory.js index db8a96d0c..c4b1d5098 100644 --- a/node_modules/yargs/build/lib/yargs-factory.js +++ b/node_modules/yargs/build/lib/yargs-factory.js @@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; -var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_versionOpt, _YargsInstance_validation; +var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation; import { command as Command, } from './command.js'; import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js'; import { YError } from './yerror.js'; @@ -44,6 +44,7 @@ const kEmitWarning = Symbol('emitWarning'); const kFreeze = Symbol('freeze'); const kGetDollarZero = Symbol('getDollarZero'); const kGetParserConfiguration = Symbol('getParserConfiguration'); +const kGetUsageConfiguration = Symbol('getUsageConfiguration'); const kGuessLocale = Symbol('guessLocale'); const kGuessVersion = Symbol('guessVersion'); const kParsePositionalNumbers = Symbol('parsePositionalNumbers'); @@ -108,6 +109,7 @@ export class YargsInstance { _YargsInstance_strictCommands.set(this, false); _YargsInstance_strictOptions.set(this, false); _YargsInstance_usage.set(this, void 0); + _YargsInstance_usageConfig.set(this, {}); _YargsInstance_versionOpt.set(this, null); _YargsInstance_validation.set(this, void 0); __classPrivateFieldSet(this, _YargsInstance_shim, shim, "f"); @@ -924,6 +926,11 @@ export class YargsInstance { return this; } } + usageConfiguration(config) { + argsert('', [config], arguments.length); + __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f"); + return this; + } version(opt, msg, ver) { const defaultVersionOpt = 'version'; argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); @@ -959,7 +966,7 @@ export class YargsInstance { __classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols); return this; } - [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { + [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { if (!argv._ || !argv['--']) return argv; argv._.push.apply(argv._, argv['--']); @@ -1059,6 +1066,9 @@ export class YargsInstance { [kGetParserConfiguration]() { return __classPrivateFieldGet(this, _YargsInstance_parserConfig, "f"); } + [kGetUsageConfiguration]() { + return __classPrivateFieldGet(this, _YargsInstance_usageConfig, "f"); + } [kGuessLocale]() { if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, "f")) return; @@ -1190,6 +1200,7 @@ export class YargsInstance { getLoggerInstance: this[kGetLoggerInstance].bind(this), getParseContext: this[kGetParseContext].bind(this), getParserConfiguration: this[kGetParserConfiguration].bind(this), + getUsageConfiguration: this[kGetUsageConfiguration].bind(this), getUsageInstance: this[kGetUsageInstance].bind(this), getValidationInstance: this[kGetValidationInstance].bind(this), hasParseCallback: this[kHasParseCallback].bind(this), diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json index d794947dc..af096a110 100644 --- a/node_modules/yargs/locales/en.json +++ b/node_modules/yargs/locales/en.json @@ -33,6 +33,10 @@ "one": "Unknown argument: %s", "other": "Unknown arguments: %s" }, + "Unknown command: %s": { + "one": "Unknown command: %s", + "other": "Unknown commands: %s" + }, "Invalid values:": "Invalid values:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", "Argument check failed: %s": "Argument check failed: %s", diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json index dfc4303e7..9bc320943 100644 --- a/node_modules/yargs/package.json +++ b/node_modules/yargs/package.json @@ -1,6 +1,6 @@ { "name": "yargs", - "version": "17.6.2", + "version": "17.7.1", "description": "yargs the modern, pirate-themed, successor to optimist.", "main": "./index.cjs", "exports": { diff --git a/package-lock.json b/package-lock.json index c539cc0d9..587f77a82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,13 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.10.0", - "axios": "^1.2.5", + "axios": "^1.3.4", "fs": "0.0.1-security", "path": "0.12.7" }, "devDependencies": { - "eslint": "^8.32.0", - "jest": "^29.4.1" + "eslint": "^8.36.0", + "jest": "^29.5.0" } }, "node_modules/@actions/core": { @@ -62,30 +62,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz", - "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", - "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz", + "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==", "dev": true, "dependencies": { - "@ampproject/remapping": "^2.1.0", + "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helpers": "^7.20.7", - "@babel/parser": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.2", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.3", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.12", - "@babel/types": "^7.20.7", + "@babel/traverse": "^7.21.3", + "@babel/types": "^7.21.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -107,13 +107,14 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", - "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz", + "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==", "dev": true, "dependencies": { - "@babel/types": "^7.20.7", + "@babel/types": "^7.21.3", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -163,13 +164,13 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", + "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" }, "engines": { "node": ">=6.9.0" @@ -200,9 +201,9 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", - "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", + "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", @@ -211,8 +212,8 @@ "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.21.2", + "@babel/types": "^7.21.2" }, "engines": { "node": ">=6.9.0" @@ -270,23 +271,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.13.tgz", - "integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", + "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", "dev": true, "dependencies": { "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" }, "engines": { "node": ">=6.9.0" @@ -378,9 +379,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", - "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", + "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -581,19 +582,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", - "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz", + "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", + "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", + "@babel/parser": "^7.21.3", + "@babel/types": "^7.21.3", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -611,9 +612,9 @@ } }, "node_modules/@babel/types": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz", - "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz", + "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.19.4", @@ -630,15 +631,39 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", + "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -653,6 +678,15 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/js": { + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -795,16 +829,16 @@ } }, "node_modules/@jest/console": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.4.1.tgz", - "integrity": "sha512-m+XpwKSi3PPM9znm5NGS8bBReeAJJpSkL1OuFCqaMaJL2YX9YXLkkI+MBchMPwu+ZuM2rynL51sgfkQteQ1CKQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.5.0.tgz", + "integrity": "sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0" }, "engines": { @@ -812,37 +846,37 @@ } }, "node_modules/@jest/core": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.4.1.tgz", - "integrity": "sha512-RXFTohpBqpaTebNdg5l3I5yadnKo9zLBajMT0I38D0tDhreVBYv3fA8kywthI00sWxPztWLD3yjiUkewwu/wKA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", + "integrity": "sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==", "dev": true, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/reporters": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/reporters": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.4.0", - "jest-config": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-resolve-dependencies": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", - "jest-watcher": "^29.4.1", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-resolve-dependencies": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "jest-watcher": "^29.5.0", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -859,88 +893,88 @@ } }, "node_modules/@jest/environment": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.4.1.tgz", - "integrity": "sha512-pJ14dHGSQke7Q3mkL/UZR9ZtTOxqskZaC91NzamEH4dlKRt42W+maRBXiw/LWkdJe+P0f/zDR37+SPMplMRlPg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", + "integrity": "sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1" + "jest-mock": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.4.1.tgz", - "integrity": "sha512-ZxKJP5DTUNF2XkpJeZIzvnzF1KkfrhEF6Rz0HGG69fHl6Bgx5/GoU3XyaeFYEjuuKSOOsbqD/k72wFvFxc3iTw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==", "dev": true, "dependencies": { - "expect": "^29.4.1", - "jest-snapshot": "^29.4.1" + "expect": "^29.5.0", + "jest-snapshot": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.4.1.tgz", - "integrity": "sha512-w6YJMn5DlzmxjO00i9wu2YSozUYRBhIoJ6nQwpMYcBMtiqMGJm1QBzOf6DDgRao8dbtpDoaqLg6iiQTvv0UHhQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.5.0.tgz", + "integrity": "sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==", "dev": true, "dependencies": { - "jest-get-type": "^29.2.0" + "jest-get-type": "^29.4.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.4.1.tgz", - "integrity": "sha512-/1joI6rfHFmmm39JxNfmNAO3Nwm6Y0VoL5fJDy7H1AtWrD1CgRtqJbN9Ld6rhAkGO76qqp4cwhhxJ9o9kYjQMw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.5.0.tgz", + "integrity": "sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.4.1.tgz", - "integrity": "sha512-znoK2EuFytbHH0ZSf2mQK2K1xtIgmaw4Da21R2C/NE/+NnItm5mPEFQmn8gmF3f0rfOlmZ3Y3bIf7bFj7DHxAA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.5.0.tgz", + "integrity": "sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/types": "^29.4.1", - "jest-mock": "^29.4.1" + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/types": "^29.5.0", + "jest-mock": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.4.1.tgz", - "integrity": "sha512-AISY5xpt2Xpxj9R6y0RF1+O6GRy9JsGa8+vK23Lmzdy1AYcpQn5ItX79wJSsTmfzPKSAcsY1LNt/8Y5Xe5LOSg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.5.0.tgz", + "integrity": "sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -953,9 +987,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -974,9 +1008,9 @@ } }, "node_modules/@jest/schemas": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.0.tgz", - "integrity": "sha512-0E01f/gOZeNTG76i5eWWSupvSHaIINrTie7vCyjiYFKgzNdyEGd12BUv4oNBFHOqlHDbtoJi3HrQ38KCC90NsQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", "dev": true, "dependencies": { "@sinclair/typebox": "^0.25.16" @@ -986,9 +1020,9 @@ } }, "node_modules/@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", + "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.15", @@ -1000,13 +1034,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.4.1.tgz", - "integrity": "sha512-WRt29Lwt+hEgfN8QDrXqXGgCTidq1rLyFqmZ4lmJOpVArC8daXrZWkWjiaijQvgd3aOUj2fM8INclKHsQW9YyQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.5.0.tgz", + "integrity": "sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==", "dev": true, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/types": "^29.5.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -1015,14 +1049,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.4.1.tgz", - "integrity": "sha512-v5qLBNSsM0eHzWLXsQ5fiB65xi49A3ILPSFQKPXzGL4Vyux0DPZAIN7NAFJa9b4BiTDP9MBF/Zqc/QA1vuiJ0w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz", + "integrity": "sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==", "dev": true, "dependencies": { - "@jest/test-result": "^29.4.1", + "@jest/test-result": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "slash": "^3.0.0" }, "engines": { @@ -1030,38 +1064,38 @@ } }, "node_modules/@jest/transform": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.4.1.tgz", - "integrity": "sha512-5w6YJrVAtiAgr0phzKjYd83UPbCXsBRTeYI4BXokv9Er9CcrH9hfXL/crCvP2d2nGOcovPUnlYiLPFLZrkG5Hg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.5.0.tgz", + "integrity": "sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", + "jest-haste-map": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^5.0.0" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.4.1.tgz", - "integrity": "sha512-zbrAXDUOnpJ+FMST2rV7QZOgec8rskg2zv8g2ajeqitp4tvZiyqTCYXANrKsM+ryj5o+LI+ZN2EgU9drrkiwSA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", + "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", "dev": true, "dependencies": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -1155,9 +1189,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.25.21", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.21.tgz", - "integrity": "sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==", + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", "dev": true }, "node_modules/@sinonjs/commons": { @@ -1253,9 +1287,9 @@ } }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", + "version": "18.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", + "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==", "dev": true }, "node_modules/@types/prettier": { @@ -1271,9 +1305,9 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.20", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.20.tgz", - "integrity": "sha512-eknWrTHofQuPk2iuqDm1waA7V6xPlbgBoaaXEgYkClhLOnB0TtbW+srJaOToAgawPxPlHQzwypFA2bhZaUGP5A==", + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -1398,9 +1432,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.5.tgz", - "integrity": "sha512-9pU/8mmjSSOb4CXVsvGIevN+MlO/t9OWtKadTaLuN85Gge3HGorUckgp8A/2FH4V4hJ7JuQ3LIeI7KAV9ITZrQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -1408,15 +1442,15 @@ } }, "node_modules/babel-jest": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.4.1.tgz", - "integrity": "sha512-xBZa/pLSsF/1sNpkgsiT3CmY7zV1kAsZ9OxxtrFqYucnOuRftXAfcJqcDVyOPeN4lttWTwhLdu0T9f8uvoPEUg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", + "integrity": "sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==", "dev": true, "dependencies": { - "@jest/transform": "^29.4.1", + "@jest/transform": "^29.5.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.4.0", + "babel-preset-jest": "^29.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -1445,9 +1479,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.0.tgz", - "integrity": "sha512-a/sZRLQJEmsmejQ2rPEUe35nO1+C9dc9O1gplH1SXmJxveQSRUYdBk8yGZG/VOUuZs1u2aHZJusEGoRMbhhwCg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -1483,12 +1517,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.4.0.tgz", - "integrity": "sha512-fUB9vZflUSM3dO/6M2TCAepTzvA4VkOvl67PjErcrQMGt9Eve7uazaeyCZ2th3UtI7ljpiBJES0F7A1vBRsLZA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.4.0", + "babel-plugin-jest-hoist": "^29.5.0", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -1527,9 +1561,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", "dev": true, "funding": [ { @@ -1542,10 +1576,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" }, "bin": { "browserslist": "cli.js" @@ -1588,9 +1622,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001449", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001449.tgz", - "integrity": "sha512-CPB+UL9XMT/Av+pJxCKGhdx+yg1hzplvFJQlJ2n68PyQGMz9L/E2zCyLdOL8uasbouTUgnPl+y0tccI/se+BEw==", + "version": "1.0.30001467", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001467.tgz", + "integrity": "sha512-cEdN/5e+RPikvl9AHm4uuLXxeCNq8rFsQ+lPHTfe/OtypP3WwnVVbjn+6uBV7PaFL6xUFzTh+sSCOz1rKhcO+Q==", "dev": true, "funding": [ { @@ -1629,9 +1663,9 @@ } }, "node_modules/ci-info": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", - "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, "funding": [ { @@ -1764,9 +1798,9 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1790,9 +1824,9 @@ } }, "node_modules/diff-sequences": { - "version": "29.3.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", - "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -1811,9 +1845,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.333", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.333.tgz", + "integrity": "sha512-YyE8+GKyGtPEP1/kpvqsdhD6rA/TP1DUFDN4uiU/YI52NzDxmwHkEb3qjId8hLBa5siJvG0sfC3O66501jMruQ==", "dev": true }, "node_modules/emittery": { @@ -1865,12 +1899,15 @@ } }, "node_modules/eslint": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", - "integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.4.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1881,10 +1918,9 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -1905,7 +1941,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -1933,33 +1968,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -1970,9 +1978,9 @@ } }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -2000,9 +2008,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2074,16 +2082,16 @@ } }, "node_modules/expect": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.4.1.tgz", - "integrity": "sha512-OKrGESHOaMxK3b6zxIq9SOW8kEXztKff/Dvg88j4xIJxur1hspEbedVkR3GpHe5LO+WB2Qw7OWN0RMTdp6as5A==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1" + "@jest/expect-utils": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2319,9 +2327,9 @@ } }, "node_modules/globals": { - "version": "13.19.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", - "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2334,9 +2342,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/grapheme-splitter": { @@ -2610,15 +2618,15 @@ } }, "node_modules/jest": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.1.tgz", - "integrity": "sha512-cknimw7gAXPDOmj0QqztlxVtBVCw2lYY9CeIE5N6kD+kET1H4H79HSNISJmijb1HF+qk+G+ploJgiDi5k/fRlg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", + "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", "dev": true, "dependencies": { - "@jest/core": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/types": "^29.5.0", "import-local": "^3.0.2", - "jest-cli": "^29.4.1" + "jest-cli": "^29.5.0" }, "bin": { "jest": "bin/jest.js" @@ -2636,9 +2644,9 @@ } }, "node_modules/jest-changed-files": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.4.0.tgz", - "integrity": "sha512-rnI1oPxgFghoz32Y8eZsGJMjW54UlqT17ycQeCEktcxxwqqKdlj9afl8LNeO0Pbu+h2JQHThQP0BzS67eTRx4w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", "dev": true, "dependencies": { "execa": "^5.0.0", @@ -2649,28 +2657,29 @@ } }, "node_modules/jest-circus": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.4.1.tgz", - "integrity": "sha512-v02NuL5crMNY4CGPHBEflLzl4v91NFb85a+dH9a1pUNx6Xjggrd8l9pPy4LZ1VYNRXlb+f65+7O/MSIbLir6pA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.5.0.tgz", + "integrity": "sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==", "dev": true, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", + "jest-each": "^29.5.0", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "p-limit": "^3.1.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2679,21 +2688,21 @@ } }, "node_modules/jest-cli": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.4.1.tgz", - "integrity": "sha512-jz7GDIhtxQ37M+9dlbv5K+/FVcIo1O/b1sX3cJgzlQUf/3VG25nvuWzlDC4F1FLLzUThJeWLu8I7JF9eWpuURQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", + "integrity": "sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==", "dev": true, "dependencies": { - "@jest/core": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-config": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -2713,31 +2722,31 @@ } }, "node_modules/jest-config": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.4.1.tgz", - "integrity": "sha512-g7p3q4NuXiM4hrS4XFATTkd+2z0Ml2RhFmFPM8c3WyKwVDNszbl4E7cV7WIx1YZeqqCtqbtTtZhGZWJlJqngzg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", + "integrity": "sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.4.1", - "@jest/types": "^29.4.1", - "babel-jest": "^29.4.1", + "@jest/test-sequencer": "^29.5.0", + "@jest/types": "^29.5.0", + "babel-jest": "^29.5.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.4.1", - "jest-environment-node": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-circus": "^29.5.0", + "jest-environment-node": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -2758,24 +2767,24 @@ } }, "node_modules/jest-diff": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.4.1.tgz", - "integrity": "sha512-uazdl2g331iY56CEyfbNA0Ut7Mn2ulAG5vUaEHXycf1L6IPyuImIxSz4F0VYBKi7LYIuxOwTZzK3wh5jHzASMw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", + "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.3.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -2785,62 +2794,62 @@ } }, "node_modules/jest-each": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.4.1.tgz", - "integrity": "sha512-QlYFiX3llJMWUV0BtWht/esGEz9w+0i7BHwODKCze7YzZzizgExB9MOfiivF/vVT0GSQ8wXLhvHXh3x2fVD4QQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.5.0.tgz", + "integrity": "sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.4.1", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "jest-util": "^29.5.0", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.4.1.tgz", - "integrity": "sha512-x/H2kdVgxSkxWAIlIh9MfMuBa0hZySmfsC5lCsWmWr6tZySP44ediRKDUiNggX/eHLH7Cd5ZN10Rw+XF5tXsqg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.5.0.tgz", + "integrity": "sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==", "dev": true, "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.4.1.tgz", - "integrity": "sha512-imTjcgfVVTvg02khXL11NNLTx9ZaofbAWhilrMg/G8dIkp+HYCswhxf0xxJwBkfhWb3e8dwbjuWburvxmcr58w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.5.0.tgz", + "integrity": "sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -2852,46 +2861,46 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.4.1.tgz", - "integrity": "sha512-akpZv7TPyGMnH2RimOCgy+hPmWZf55EyFUvymQ4LMsQP8xSPlZumCPtXGoDhFNhUE2039RApZkTQDKU79p/FiQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", + "integrity": "sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==", "dev": true, "dependencies": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.4.1.tgz", - "integrity": "sha512-k5h0u8V4nAEy6lSACepxL/rw78FLDkBnXhZVgFneVpnJONhb2DhZj/Gv4eNe+1XqQ5IhgUcqj745UwH0HJmMnA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz", + "integrity": "sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.4.1.tgz", - "integrity": "sha512-H4/I0cXUaLeCw6FM+i4AwCnOwHRgitdaUFOdm49022YD5nfyr8C/DrbXOBEyJaj+w/y0gGJ57klssOaUiLLQGQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", + "integrity": "sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2900,14 +2909,14 @@ } }, "node_modules/jest-mock": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.4.1.tgz", - "integrity": "sha512-MwA4hQ7zBOcgVCVnsM8TzaFLVUD/pFWTfbkY953Y81L5ret3GFRZtmPmRFAjKQSdCKoJvvqOu6Bvfpqlwwb0dQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", + "integrity": "sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-util": "^29.4.1" + "jest-util": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2931,26 +2940,26 @@ } }, "node_modules/jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.4.1.tgz", - "integrity": "sha512-j/ZFNV2lm9IJ2wmlq1uYK0Y/1PiyDq9g4HEGsNTNr3viRbJdV+8Lf1SXIiLZXFvyiisu0qUyIXGBnw+OKWkJwQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.5.0.tgz", + "integrity": "sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" @@ -2960,43 +2969,43 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.1.tgz", - "integrity": "sha512-Y3QG3M1ncAMxfjbYgtqNXC5B595zmB6e//p/qpA/58JkQXu/IpLDoLeOa8YoYfsSglBKQQzNUqtfGJJT/qLmJg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz", + "integrity": "sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==", "dev": true, "dependencies": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.4.1" + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.4.1.tgz", - "integrity": "sha512-8d6XXXi7GtHmsHrnaqBKWxjKb166Eyj/ksSaUYdcBK09VbjPwIgWov1VwSmtupCIz8q1Xv4Qkzt/BTo3ZqiCeg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", + "integrity": "sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==", "dev": true, "dependencies": { - "@jest/console": "^29.4.1", - "@jest/environment": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/environment": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-leak-detector": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-resolve": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-util": "^29.4.1", - "jest-watcher": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-leak-detector": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-resolve": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-util": "^29.5.0", + "jest-watcher": "^29.5.0", + "jest-worker": "^29.5.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -3005,32 +3014,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.4.1.tgz", - "integrity": "sha512-UXTMU9uKu2GjYwTtoAw5rn4STxWw/nadOfW7v1sx6LaJYa3V/iymdCLQM6xy3+7C6mY8GfX22vKpgxY171UIoA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/globals": "^29.4.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", + "integrity": "sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/globals": "^29.5.0", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "semver": "^7.3.5", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -3038,43 +3046,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-runtime/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-runtime/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/jest-snapshot": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.4.1.tgz", - "integrity": "sha512-l4iV8EjGgQWVz3ee/LR9sULDk2pCkqb71bjvlqn+qp90lFwpnulHj4ZBT8nm1hA1C5wowXLc7MGnw321u0tsYA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", + "integrity": "sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", @@ -3083,23 +3058,22 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/expect-utils": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.4.1", + "expect": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "semver": "^7.3.5" }, "engines": { @@ -3140,12 +3114,12 @@ "dev": true }, "node_modules/jest-util": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.4.1.tgz", - "integrity": "sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", + "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -3157,17 +3131,17 @@ } }, "node_modules/jest-validate": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.4.1.tgz", - "integrity": "sha512-qNZXcZQdIQx4SfUB/atWnI4/I2HUvhz8ajOSYUu40CSmf9U5emil8EDHgE7M+3j9/pavtk3knlZBDsgFvv/SWw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", + "integrity": "sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==", "dev": true, "dependencies": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", + "jest-get-type": "^29.4.3", "leven": "^3.1.0", - "pretty-format": "^29.4.1" + "pretty-format": "^29.5.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3186,18 +3160,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.4.1.tgz", - "integrity": "sha512-vFOzflGFs27nU6h8dpnVRER3O2rFtL+VMEwnG0H3KLHcllLsU8y9DchSh0AL/Rg5nN1/wSiQ+P4ByMGpuybaVw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", + "integrity": "sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==", "dev": true, "dependencies": { - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "string-length": "^4.0.1" }, "engines": { @@ -3205,13 +3179,13 @@ } }, "node_modules/jest-worker": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.1.tgz", - "integrity": "sha512-O9doU/S1EBe+yp/mstQ0VpPwpv0Clgn68TkNwGxL6/usX/KUW9Arnn4ag8C3jc6qHcXznhsT5Na1liYzAsuAbQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", + "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", "dev": true, "dependencies": { "@types/node": "*", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -3469,9 +3443,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, "node_modules/normalize-path": { @@ -3748,12 +3722,12 @@ } }, "node_modules/pretty-format": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.1.tgz", - "integrity": "sha512-dt/Z761JUVsrIKaY215o1xQJBGlSmTx/h4cSqXqjHLnU1+Kt+mavVE7UgqJJO5ukx5HjSswHfmXz4LjS2oIJfg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", + "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3808,6 +3782,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.1.tgz", + "integrity": "sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3834,18 +3824,6 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3903,9 +3881,9 @@ } }, "node_modules/resolve.exports": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", - "integrity": "sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.1.tgz", + "integrity": "sha512-OEJWVeimw8mgQuj3HfkNl4KqRevH7lzeQNaWRPfx0PPse7Jk6ozcsG4FKVgtzDsC1KUF+YlTHh17NcgHOPykLw==", "dev": true, "engines": { "node": ">=10" @@ -4294,9 +4272,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -4370,16 +4348,16 @@ "dev": true }, "node_modules/write-file-atomic": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz", - "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/y18n": { @@ -4398,9 +4376,9 @@ "dev": true }, "node_modules/yargs": { - "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", "dev": true, "dependencies": { "cliui": "^8.0.1", @@ -4475,27 +4453,27 @@ } }, "@babel/compat-data": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz", - "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", "dev": true }, "@babel/core": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", - "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz", + "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==", "dev": true, "requires": { - "@ampproject/remapping": "^2.1.0", + "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helpers": "^7.20.7", - "@babel/parser": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.2", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.3", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.12", - "@babel/types": "^7.20.7", + "@babel/traverse": "^7.21.3", + "@babel/types": "^7.21.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -4512,13 +4490,14 @@ } }, "@babel/generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", - "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz", + "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==", "dev": true, "requires": { - "@babel/types": "^7.20.7", + "@babel/types": "^7.21.3", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "dependencies": { @@ -4555,13 +4534,13 @@ "dev": true }, "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", + "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" } }, "@babel/helper-hoist-variables": { @@ -4583,9 +4562,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", - "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", + "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", @@ -4594,8 +4573,8 @@ "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.21.2", + "@babel/types": "^7.21.2" } }, "@babel/helper-plugin-utils": { @@ -4635,20 +4614,20 @@ "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", "dev": true }, "@babel/helpers": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.13.tgz", - "integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", + "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", "dev": true, "requires": { "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.13", - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" } }, "@babel/highlight": { @@ -4721,9 +4700,9 @@ } }, "@babel/parser": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", - "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", + "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -4864,19 +4843,19 @@ } }, "@babel/traverse": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", - "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz", + "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", + "@babel/generator": "^7.21.3", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", + "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", + "@babel/parser": "^7.21.3", + "@babel/types": "^7.21.3", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -4890,9 +4869,9 @@ } }, "@babel/types": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz", - "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz", + "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.19.4", @@ -4906,15 +4885,30 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@eslint-community/eslint-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", + "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true + }, "@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -4923,6 +4917,12 @@ "strip-json-comments": "^3.1.1" } }, + "@eslint/js": { + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "dev": true + }, "@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -5030,123 +5030,123 @@ "dev": true }, "@jest/console": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.4.1.tgz", - "integrity": "sha512-m+XpwKSi3PPM9znm5NGS8bBReeAJJpSkL1OuFCqaMaJL2YX9YXLkkI+MBchMPwu+ZuM2rynL51sgfkQteQ1CKQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.5.0.tgz", + "integrity": "sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0" } }, "@jest/core": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.4.1.tgz", - "integrity": "sha512-RXFTohpBqpaTebNdg5l3I5yadnKo9zLBajMT0I38D0tDhreVBYv3fA8kywthI00sWxPztWLD3yjiUkewwu/wKA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", + "integrity": "sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==", "dev": true, "requires": { - "@jest/console": "^29.4.1", - "@jest/reporters": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/reporters": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.4.0", - "jest-config": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-resolve-dependencies": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", - "jest-watcher": "^29.4.1", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-resolve-dependencies": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "jest-watcher": "^29.5.0", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" } }, "@jest/environment": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.4.1.tgz", - "integrity": "sha512-pJ14dHGSQke7Q3mkL/UZR9ZtTOxqskZaC91NzamEH4dlKRt42W+maRBXiw/LWkdJe+P0f/zDR37+SPMplMRlPg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", + "integrity": "sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==", "dev": true, "requires": { - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1" + "jest-mock": "^29.5.0" } }, "@jest/expect": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.4.1.tgz", - "integrity": "sha512-ZxKJP5DTUNF2XkpJeZIzvnzF1KkfrhEF6Rz0HGG69fHl6Bgx5/GoU3XyaeFYEjuuKSOOsbqD/k72wFvFxc3iTw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==", "dev": true, "requires": { - "expect": "^29.4.1", - "jest-snapshot": "^29.4.1" + "expect": "^29.5.0", + "jest-snapshot": "^29.5.0" } }, "@jest/expect-utils": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.4.1.tgz", - "integrity": "sha512-w6YJMn5DlzmxjO00i9wu2YSozUYRBhIoJ6nQwpMYcBMtiqMGJm1QBzOf6DDgRao8dbtpDoaqLg6iiQTvv0UHhQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.5.0.tgz", + "integrity": "sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==", "dev": true, "requires": { - "jest-get-type": "^29.2.0" + "jest-get-type": "^29.4.3" } }, "@jest/fake-timers": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.4.1.tgz", - "integrity": "sha512-/1joI6rfHFmmm39JxNfmNAO3Nwm6Y0VoL5fJDy7H1AtWrD1CgRtqJbN9Ld6rhAkGO76qqp4cwhhxJ9o9kYjQMw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.5.0.tgz", + "integrity": "sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" } }, "@jest/globals": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.4.1.tgz", - "integrity": "sha512-znoK2EuFytbHH0ZSf2mQK2K1xtIgmaw4Da21R2C/NE/+NnItm5mPEFQmn8gmF3f0rfOlmZ3Y3bIf7bFj7DHxAA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.5.0.tgz", + "integrity": "sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==", "dev": true, "requires": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/types": "^29.4.1", - "jest-mock": "^29.4.1" + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/types": "^29.5.0", + "jest-mock": "^29.5.0" } }, "@jest/reporters": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.4.1.tgz", - "integrity": "sha512-AISY5xpt2Xpxj9R6y0RF1+O6GRy9JsGa8+vK23Lmzdy1AYcpQn5ItX79wJSsTmfzPKSAcsY1LNt/8Y5Xe5LOSg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.5.0.tgz", + "integrity": "sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -5159,9 +5159,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -5169,18 +5169,18 @@ } }, "@jest/schemas": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.0.tgz", - "integrity": "sha512-0E01f/gOZeNTG76i5eWWSupvSHaIINrTie7vCyjiYFKgzNdyEGd12BUv4oNBFHOqlHDbtoJi3HrQ38KCC90NsQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", "dev": true, "requires": { "@sinclair/typebox": "^0.25.16" } }, "@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", + "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.15", @@ -5189,59 +5189,59 @@ } }, "@jest/test-result": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.4.1.tgz", - "integrity": "sha512-WRt29Lwt+hEgfN8QDrXqXGgCTidq1rLyFqmZ4lmJOpVArC8daXrZWkWjiaijQvgd3aOUj2fM8INclKHsQW9YyQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.5.0.tgz", + "integrity": "sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==", "dev": true, "requires": { - "@jest/console": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/types": "^29.5.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.4.1.tgz", - "integrity": "sha512-v5qLBNSsM0eHzWLXsQ5fiB65xi49A3ILPSFQKPXzGL4Vyux0DPZAIN7NAFJa9b4BiTDP9MBF/Zqc/QA1vuiJ0w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz", + "integrity": "sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==", "dev": true, "requires": { - "@jest/test-result": "^29.4.1", + "@jest/test-result": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.4.1.tgz", - "integrity": "sha512-5w6YJrVAtiAgr0phzKjYd83UPbCXsBRTeYI4BXokv9Er9CcrH9hfXL/crCvP2d2nGOcovPUnlYiLPFLZrkG5Hg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.5.0.tgz", + "integrity": "sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", + "jest-haste-map": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^5.0.0" + "write-file-atomic": "^4.0.2" } }, "@jest/types": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.4.1.tgz", - "integrity": "sha512-zbrAXDUOnpJ+FMST2rV7QZOgec8rskg2zv8g2ajeqitp4tvZiyqTCYXANrKsM+ryj5o+LI+ZN2EgU9drrkiwSA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", + "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", "dev": true, "requires": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -5314,9 +5314,9 @@ } }, "@sinclair/typebox": { - "version": "0.25.21", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.21.tgz", - "integrity": "sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g==", + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", "dev": true }, "@sinonjs/commons": { @@ -5412,9 +5412,9 @@ } }, "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", + "version": "18.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", + "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==", "dev": true }, "@types/prettier": { @@ -5430,9 +5430,9 @@ "dev": true }, "@types/yargs": { - "version": "17.0.20", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.20.tgz", - "integrity": "sha512-eknWrTHofQuPk2iuqDm1waA7V6xPlbgBoaaXEgYkClhLOnB0TtbW+srJaOToAgawPxPlHQzwypFA2bhZaUGP5A==", + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -5523,9 +5523,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.5.tgz", - "integrity": "sha512-9pU/8mmjSSOb4CXVsvGIevN+MlO/t9OWtKadTaLuN85Gge3HGorUckgp8A/2FH4V4hJ7JuQ3LIeI7KAV9ITZrQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -5533,15 +5533,15 @@ } }, "babel-jest": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.4.1.tgz", - "integrity": "sha512-xBZa/pLSsF/1sNpkgsiT3CmY7zV1kAsZ9OxxtrFqYucnOuRftXAfcJqcDVyOPeN4lttWTwhLdu0T9f8uvoPEUg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", + "integrity": "sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==", "dev": true, "requires": { - "@jest/transform": "^29.4.1", + "@jest/transform": "^29.5.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.4.0", + "babel-preset-jest": "^29.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -5561,9 +5561,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.0.tgz", - "integrity": "sha512-a/sZRLQJEmsmejQ2rPEUe35nO1+C9dc9O1gplH1SXmJxveQSRUYdBk8yGZG/VOUuZs1u2aHZJusEGoRMbhhwCg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -5593,12 +5593,12 @@ } }, "babel-preset-jest": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.4.0.tgz", - "integrity": "sha512-fUB9vZflUSM3dO/6M2TCAepTzvA4VkOvl67PjErcrQMGt9Eve7uazaeyCZ2th3UtI7ljpiBJES0F7A1vBRsLZA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.4.0", + "babel-plugin-jest-hoist": "^29.5.0", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -5628,15 +5628,15 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" } }, "bser": { @@ -5667,9 +5667,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001449", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001449.tgz", - "integrity": "sha512-CPB+UL9XMT/Av+pJxCKGhdx+yg1hzplvFJQlJ2n68PyQGMz9L/E2zCyLdOL8uasbouTUgnPl+y0tccI/se+BEw==", + "version": "1.0.30001467", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001467.tgz", + "integrity": "sha512-cEdN/5e+RPikvl9AHm4uuLXxeCNq8rFsQ+lPHTfe/OtypP3WwnVVbjn+6uBV7PaFL6xUFzTh+sSCOz1rKhcO+Q==", "dev": true }, "chalk": { @@ -5689,9 +5689,9 @@ "dev": true }, "ci-info": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", - "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true }, "cjs-module-lexer": { @@ -5791,9 +5791,9 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, "delayed-stream": { @@ -5808,9 +5808,9 @@ "dev": true }, "diff-sequences": { - "version": "29.3.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", - "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", "dev": true }, "doctrine": { @@ -5823,9 +5823,9 @@ } }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.333", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.333.tgz", + "integrity": "sha512-YyE8+GKyGtPEP1/kpvqsdhD6rA/TP1DUFDN4uiU/YI52NzDxmwHkEb3qjId8hLBa5siJvG0sfC3O66501jMruQ==", "dev": true }, "emittery": { @@ -5862,12 +5862,15 @@ "dev": true }, "eslint": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", - "integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.4.1", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -5878,10 +5881,9 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", @@ -5902,7 +5904,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -5918,23 +5919,6 @@ "estraverse": "^5.2.0" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -5942,9 +5926,9 @@ "dev": true }, "espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -5959,9 +5943,9 @@ "dev": true }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -6012,16 +5996,16 @@ "dev": true }, "expect": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.4.1.tgz", - "integrity": "sha512-OKrGESHOaMxK3b6zxIq9SOW8kEXztKff/Dvg88j4xIJxur1hspEbedVkR3GpHe5LO+WB2Qw7OWN0RMTdp6as5A==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==", "dev": true, "requires": { - "@jest/expect-utils": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1" + "@jest/expect-utils": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0" } }, "fast-deep-equal": { @@ -6191,18 +6175,18 @@ } }, "globals": { - "version": "13.19.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", - "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "grapheme-splitter": { @@ -6404,21 +6388,21 @@ } }, "jest": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.1.tgz", - "integrity": "sha512-cknimw7gAXPDOmj0QqztlxVtBVCw2lYY9CeIE5N6kD+kET1H4H79HSNISJmijb1HF+qk+G+ploJgiDi5k/fRlg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", + "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", "dev": true, "requires": { - "@jest/core": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/types": "^29.5.0", "import-local": "^3.0.2", - "jest-cli": "^29.4.1" + "jest-cli": "^29.5.0" } }, "jest-changed-files": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.4.0.tgz", - "integrity": "sha512-rnI1oPxgFghoz32Y8eZsGJMjW54UlqT17ycQeCEktcxxwqqKdlj9afl8LNeO0Pbu+h2JQHThQP0BzS67eTRx4w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", "dev": true, "requires": { "execa": "^5.0.0", @@ -6426,204 +6410,205 @@ } }, "jest-circus": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.4.1.tgz", - "integrity": "sha512-v02NuL5crMNY4CGPHBEflLzl4v91NFb85a+dH9a1pUNx6Xjggrd8l9pPy4LZ1VYNRXlb+f65+7O/MSIbLir6pA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.5.0.tgz", + "integrity": "sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==", "dev": true, "requires": { - "@jest/environment": "^29.4.1", - "@jest/expect": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", + "jest-each": "^29.5.0", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "p-limit": "^3.1.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-cli": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.4.1.tgz", - "integrity": "sha512-jz7GDIhtxQ37M+9dlbv5K+/FVcIo1O/b1sX3cJgzlQUf/3VG25nvuWzlDC4F1FLLzUThJeWLu8I7JF9eWpuURQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", + "integrity": "sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==", "dev": true, "requires": { - "@jest/core": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/core": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-config": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "prompts": "^2.0.1", "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.4.1.tgz", - "integrity": "sha512-g7p3q4NuXiM4hrS4XFATTkd+2z0Ml2RhFmFPM8c3WyKwVDNszbl4E7cV7WIx1YZeqqCtqbtTtZhGZWJlJqngzg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", + "integrity": "sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.4.1", - "@jest/types": "^29.4.1", - "babel-jest": "^29.4.1", + "@jest/test-sequencer": "^29.5.0", + "@jest/types": "^29.5.0", + "babel-jest": "^29.5.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.4.1", - "jest-environment-node": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-runner": "^29.4.1", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-circus": "^29.5.0", + "jest-environment-node": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" } }, "jest-diff": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.4.1.tgz", - "integrity": "sha512-uazdl2g331iY56CEyfbNA0Ut7Mn2ulAG5vUaEHXycf1L6IPyuImIxSz4F0VYBKi7LYIuxOwTZzK3wh5jHzASMw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", + "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.3.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" } }, "jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.4.1.tgz", - "integrity": "sha512-QlYFiX3llJMWUV0BtWht/esGEz9w+0i7BHwODKCze7YzZzizgExB9MOfiivF/vVT0GSQ8wXLhvHXh3x2fVD4QQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.5.0.tgz", + "integrity": "sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.4.1", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "jest-util": "^29.5.0", + "pretty-format": "^29.5.0" } }, "jest-environment-node": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.4.1.tgz", - "integrity": "sha512-x/H2kdVgxSkxWAIlIh9MfMuBa0hZySmfsC5lCsWmWr6tZySP44ediRKDUiNggX/eHLH7Cd5ZN10Rw+XF5tXsqg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.5.0.tgz", + "integrity": "sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==", "dev": true, "requires": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-mock": "^29.4.1", - "jest-util": "^29.4.1" + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" } }, "jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", "dev": true }, "jest-haste-map": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.4.1.tgz", - "integrity": "sha512-imTjcgfVVTvg02khXL11NNLTx9ZaofbAWhilrMg/G8dIkp+HYCswhxf0xxJwBkfhWb3e8dwbjuWburvxmcr58w==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.5.0.tgz", + "integrity": "sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.4.1.tgz", - "integrity": "sha512-akpZv7TPyGMnH2RimOCgy+hPmWZf55EyFUvymQ4LMsQP8xSPlZumCPtXGoDhFNhUE2039RApZkTQDKU79p/FiQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", + "integrity": "sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==", "dev": true, "requires": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" } }, "jest-matcher-utils": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.4.1.tgz", - "integrity": "sha512-k5h0u8V4nAEy6lSACepxL/rw78FLDkBnXhZVgFneVpnJONhb2DhZj/Gv4eNe+1XqQ5IhgUcqj745UwH0HJmMnA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz", + "integrity": "sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.4.1" + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" } }, "jest-message-util": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.4.1.tgz", - "integrity": "sha512-H4/I0cXUaLeCw6FM+i4AwCnOwHRgitdaUFOdm49022YD5nfyr8C/DrbXOBEyJaj+w/y0gGJ57klssOaUiLLQGQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", + "integrity": "sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-mock": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.4.1.tgz", - "integrity": "sha512-MwA4hQ7zBOcgVCVnsM8TzaFLVUD/pFWTfbkY953Y81L5ret3GFRZtmPmRFAjKQSdCKoJvvqOu6Bvfpqlwwb0dQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", + "integrity": "sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", - "jest-util": "^29.4.1" + "jest-util": "^29.5.0" } }, "jest-pnp-resolver": { @@ -6634,128 +6619,101 @@ "requires": {} }, "jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", "dev": true }, "jest-resolve": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.4.1.tgz", - "integrity": "sha512-j/ZFNV2lm9IJ2wmlq1uYK0Y/1PiyDq9g4HEGsNTNr3viRbJdV+8Lf1SXIiLZXFvyiisu0qUyIXGBnw+OKWkJwQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.5.0.tgz", + "integrity": "sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", + "jest-haste-map": "^29.5.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.4.1", - "jest-validate": "^29.4.1", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.1.tgz", - "integrity": "sha512-Y3QG3M1ncAMxfjbYgtqNXC5B595zmB6e//p/qpA/58JkQXu/IpLDoLeOa8YoYfsSglBKQQzNUqtfGJJT/qLmJg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz", + "integrity": "sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==", "dev": true, "requires": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.4.1" + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.5.0" } }, "jest-runner": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.4.1.tgz", - "integrity": "sha512-8d6XXXi7GtHmsHrnaqBKWxjKb166Eyj/ksSaUYdcBK09VbjPwIgWov1VwSmtupCIz8q1Xv4Qkzt/BTo3ZqiCeg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", + "integrity": "sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==", "dev": true, "requires": { - "@jest/console": "^29.4.1", - "@jest/environment": "^29.4.1", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/console": "^29.5.0", + "@jest/environment": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.4.1", - "jest-haste-map": "^29.4.1", - "jest-leak-detector": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-resolve": "^29.4.1", - "jest-runtime": "^29.4.1", - "jest-util": "^29.4.1", - "jest-watcher": "^29.4.1", - "jest-worker": "^29.4.1", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-leak-detector": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-resolve": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-util": "^29.5.0", + "jest-watcher": "^29.5.0", + "jest-worker": "^29.5.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "jest-runtime": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.4.1.tgz", - "integrity": "sha512-UXTMU9uKu2GjYwTtoAw5rn4STxWw/nadOfW7v1sx6LaJYa3V/iymdCLQM6xy3+7C6mY8GfX22vKpgxY171UIoA==", - "dev": true, - "requires": { - "@jest/environment": "^29.4.1", - "@jest/fake-timers": "^29.4.1", - "@jest/globals": "^29.4.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", + "integrity": "sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==", + "dev": true, + "requires": { + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/globals": "^29.5.0", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-mock": "^29.4.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.4.1", - "jest-snapshot": "^29.4.1", - "jest-util": "^29.4.1", - "semver": "^7.3.5", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } } }, "jest-snapshot": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.4.1.tgz", - "integrity": "sha512-l4iV8EjGgQWVz3ee/LR9sULDk2pCkqb71bjvlqn+qp90lFwpnulHj4ZBT8nm1hA1C5wowXLc7MGnw321u0tsYA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", + "integrity": "sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==", "dev": true, "requires": { "@babel/core": "^7.11.6", @@ -6764,23 +6722,22 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.4.1", - "@jest/transform": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/expect-utils": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.4.1", + "expect": "^29.5.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.4.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.4.1", - "jest-matcher-utils": "^29.4.1", - "jest-message-util": "^29.4.1", - "jest-util": "^29.4.1", + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.4.1", + "pretty-format": "^29.5.0", "semver": "^7.3.5" }, "dependencies": { @@ -6811,12 +6768,12 @@ } }, "jest-util": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.4.1.tgz", - "integrity": "sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", + "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -6825,17 +6782,17 @@ } }, "jest-validate": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.4.1.tgz", - "integrity": "sha512-qNZXcZQdIQx4SfUB/atWnI4/I2HUvhz8ajOSYUu40CSmf9U5emil8EDHgE7M+3j9/pavtk3knlZBDsgFvv/SWw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", + "integrity": "sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==", "dev": true, "requires": { - "@jest/types": "^29.4.1", + "@jest/types": "^29.5.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", + "jest-get-type": "^29.4.3", "leven": "^3.1.0", - "pretty-format": "^29.4.1" + "pretty-format": "^29.5.0" }, "dependencies": { "camelcase": { @@ -6847,29 +6804,29 @@ } }, "jest-watcher": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.4.1.tgz", - "integrity": "sha512-vFOzflGFs27nU6h8dpnVRER3O2rFtL+VMEwnG0H3KLHcllLsU8y9DchSh0AL/Rg5nN1/wSiQ+P4ByMGpuybaVw==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", + "integrity": "sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==", "dev": true, "requires": { - "@jest/test-result": "^29.4.1", - "@jest/types": "^29.4.1", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.4.1.tgz", - "integrity": "sha512-O9doU/S1EBe+yp/mstQ0VpPwpv0Clgn68TkNwGxL6/usX/KUW9Arnn4ag8C3jc6qHcXznhsT5Na1liYzAsuAbQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", + "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", "dev": true, "requires": { "@types/node": "*", - "jest-util": "^29.4.1", + "jest-util": "^29.5.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -7069,9 +7026,9 @@ "dev": true }, "node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, "normalize-path": { @@ -7272,12 +7229,12 @@ "dev": true }, "pretty-format": { - "version": "29.4.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.1.tgz", - "integrity": "sha512-dt/Z761JUVsrIKaY215o1xQJBGlSmTx/h4cSqXqjHLnU1+Kt+mavVE7UgqJJO5ukx5HjSswHfmXz4LjS2oIJfg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", + "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", "dev": true, "requires": { - "@jest/schemas": "^29.4.0", + "@jest/schemas": "^29.4.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -7316,6 +7273,12 @@ "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, + "pure-rand": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.1.tgz", + "integrity": "sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7328,12 +7291,6 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7375,9 +7332,9 @@ "dev": true }, "resolve.exports": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", - "integrity": "sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.1.tgz", + "integrity": "sha512-OEJWVeimw8mgQuj3HfkNl4KqRevH7lzeQNaWRPfx0PPse7Jk6ozcsG4FKVgtzDsC1KUF+YlTHh17NcgHOPykLw==", "dev": true }, "reusify": { @@ -7649,9 +7606,9 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.12", @@ -7709,9 +7666,9 @@ "dev": true }, "write-file-atomic": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz", - "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "requires": { "imurmurhash": "^0.1.4", @@ -7731,9 +7688,9 @@ "dev": true }, "yargs": { - "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", "dev": true, "requires": { "cliui": "^8.0.1", diff --git a/package.json b/package.json index 3f392d459..b43727c0f 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,12 @@ "homepage": "https://github.com/rnkdsh/action-upload-diawi#readme", "dependencies": { "@actions/core": "^1.10.0", - "axios": "^1.2.5", + "axios": "^1.3.4", "fs": "0.0.1-security", "path": "0.12.7" }, "devDependencies": { - "eslint": "^8.32.0", - "jest": "^29.4.1" + "eslint": "^8.36.0", + "jest": "^29.5.0" } }